public interface OAuthTokenResponse
Encapsulates the response from an OAuth Token Server.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic OAuthTokenResponseDerivesOAuthTokenResponsefrom a parsed JSON value.Gets the access token.getError()Gets the error; SHOULD be non-null ifgetAccessToken()is null.Gets the OPTIONAL error description.Gets the OPTIONAL error URI.intGets the number of seconds until the token expires.Gets the OIDC ID token.Gets the refresh token.Gets the token type.
-
Method Details
-
from
DerivesOAuthTokenResponsefrom a parsed JSON value.- Parameters:
json- parsed JSON value- Returns:
OAuthTokenResponse
-
getTokenType
String getTokenType()Gets the token type.- Returns:
- token type; i.e. "bearer"
- See Also:
-
getAccessToken
String getAccessToken()Gets the access token.- Returns:
- access token
-
getIdToken
String getIdToken()Gets the OIDC ID token.- Returns:
- OIDC ID token
-
getRefreshToken
String getRefreshToken()Gets the refresh token.- Returns:
- refresh token
-
getExpiresIn
int getExpiresIn()Gets the number of seconds until the token expires.- Returns:
- number of seconds until the token expires
-
getError
String getError()Gets the error; SHOULD be non-null ifgetAccessToken()is null.- Returns:
- error code
-
getErrorDescription
String getErrorDescription()Gets the OPTIONAL error description.- Returns:
- error description
-
getErrorUri
URI getErrorUri()Gets the OPTIONAL error URI.- Returns:
- error URI
-