Class LatitudePayAuthToken
Represents a token returned from the LatitudePay Authorization endpoint.
Inherited Members
Namespace: Yort.LatitudePay.InStore
Assembly: Yort.LatitudePay.InStore.dll
Syntax
public class LatitudePayAuthToken
Remarks
This class is used internally by LatitudePayClient which will automatically request and renew tokens as required. It is not expected to be used directly by application code.
Properties
| Improve this Doc View SourceExpiryDate
Gets or sets the date and time at which this token expires.
Declaration
[JsonProperty("expiryDate")]
public DateTimeOffset ExpiryDate { get; set; }
Property Value
Type | Description |
---|---|
DateTimeOffset | The expiry date and time. |
Token
Gets or sets the authorization token return by LatitudePay.
Declaration
[JsonProperty("authToken")]
public string Token { get; set; }
Property Value
Type | Description |
---|---|
String | The token. |
Methods
| Improve this Doc View SourceIsValid(ILatitudePaySystemClock)
Returns a boolean indicating if this Token value should currently be usable with the LatitudePay API.
Declaration
public bool IsValid(ILatitudePaySystemClock clock)
Parameters
Type | Name | Description |
---|---|---|
ILatitudePaySystemClock | clock | An instance implementing ILatitudePaySystemClock used to determine the current time. |
Returns
Type | Description |
---|---|
Boolean |
|
Remarks
Returns true if clock
is not empty and the current time (using clock
) is more than one minute before ExpiryDate.
If clock
is null then DefaultInstance is used.