Appearance
AuthenticationToken Class
Definition
Represents an OAuth token returned by a ServiceNow instance and provides helpers to acquire/refresh tokens via /oauth_token.do.
- Namespace:
JASE.ServiceNow - Assembly:
JASE.ServiceNow.dll
Properties
| Name | Description |
|---|---|
AccessToken | Access token value to be used as an OAuth 2.0 Bearer token. |
Expires | UTC timestamp of when the access token expires |
Granted | UTC timestamp of when the current access token was granted |
GrantUri | Uri that granted the Token |
IsExpired | Returns true if the access token is missing or has expired. |
Lifespan | Lifespan of the access token in seconds as returned by the token endpoint |
RefreshToken | Refresh token returned by the password grant flow (typically null/empty for client_credentials). |
Scope | OAuth scope string returned by the token endpoint (may be empty depending on instance configuration). |
TimeUntilExpiration | TimeSpan representing amount of time remaining for token lifetiem |
TokenType | Type of token issued by the request as defined in the OAuth RFC. The token type is always Bearer. |
Methods
| Name | Description |
|---|---|
bool IsValid(TimeSpan skew) | Returns true when the access token is present and will remain valid beyond the specified time skew. |