Skip to content

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 ​

NameDescription
AccessTokenAccess token value to be used as an OAuth 2.0 Bearer token.
ExpiresUTC timestamp of when the access token expires
GrantedUTC timestamp of when the current access token was granted
GrantUriUri that granted the Token
IsExpiredReturns true if the access token is missing or has expired.
LifespanLifespan of the access token in seconds as returned by the token endpoint
RefreshTokenRefresh token returned by the password grant flow (typically null/empty for client_credentials).
ScopeOAuth scope string returned by the token endpoint (may be empty depending on instance configuration).
TimeUntilExpirationTimeSpan representing amount of time remaining for token lifetiem
TokenTypeType of token issued by the request as defined in the OAuth RFC. The token type is always Bearer.

Methods ​

NameDescription
bool IsValid(TimeSpan skew)Returns true when the access token is present and will remain valid beyond the specified time skew.