Class OAuthAccessTokenResponse

Contains OAuth-related artifacts from the HTTP response from the third-party OAuth server when requesting an access token

Property Summary 

PropertyDescription
IDToken: String (read-only)Returns the ID token, if available
accessToken: String (read-only)Returns the access token
accessTokenExpiry: Number (read-only)Returns the access token expiration
errorStatus: String (read-only)Returns the error status.
extraTokens: Map (read-only)Returns a map of additional tokens found in the response.
oauthProviderId: String (read-only)Returns the OAuth provider id
refreshToken: String (read-only)Returns the refresh token

Constructor Summary 

This class does not have a constructor, so you cannot create it directly.

Method Summary 

MethodDescription
getAccessToken()Returns the access token
getAccessTokenExpiry()Returns the access token expiration
getErrorStatus()Returns the error status.
getExtraTokens()Returns a map of additional tokens found in the response.
getIDToken()Returns the ID token, if available
getOauthProviderId()Returns the OAuth provider id
getRefreshToken()Returns the refresh token

Methods inherited from class Object 

assign, create, create, defineProperties, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, is, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, seal, setPrototypeOf, toLocaleString, toString, valueOf, values

Property Details 

IDToken 

IDToken: String (read-only)

Returns the ID token, if available


accessToken 

accessToken: String (read-only)

Returns the access token


accessTokenExpiry 

accessTokenExpiry: Number (read-only)

Returns the access token expiration


errorStatus 

errorStatus: String (read-only)

Returns the error status. In cases of errors - more detailed error information can be seen in the error log files (specifity of error details vary by OAuth provider).


extraTokens 

extraTokens: Map (read-only)

Returns a map of additional tokens found in the response.


oauthProviderId 

oauthProviderId: String (read-only)

Returns the OAuth provider id


refreshToken 

refreshToken: String (read-only)

Returns the refresh token


Method Details 

getAccessToken() 

getAccessToken(): String

Returns the access token

Returns:

  • the access token, if available, null otherwise

getAccessTokenExpiry() 

getAccessTokenExpiry(): Number

Returns the access token expiration

Returns:

  • the access token expiration

getErrorStatus() 

getErrorStatus(): String

Returns the error status. In cases of errors - more detailed error information can be seen in the error log files (specifity of error details vary by OAuth provider).

Returns:

  • the error status, if available, null otherwise

getExtraTokens() 

getExtraTokens(): Map

Returns a map of additional tokens found in the response.

Returns:

  • Additional tokens provided by the token end-point. May be null or empty.

getIDToken() 

getIDToken(): String

Returns the ID token, if available

Returns:

  • the ID token, if available, null otherwise

getOauthProviderId() 

getOauthProviderId(): String

Returns the OAuth provider id

Returns:

  • the OAuth provider id

getRefreshToken() 

getRefreshToken(): String

Returns the refresh token

Returns:

  • the refresh token, if available, null otherwise

DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!