Class TokenResponse
java.lang.Object
com.revetsec.oauth.TokenResponse
One token-endpoint success. It carries raw tokens, not a verified identity. Unknown JSON members can be inspected
through safe accessors; all token and error members, including
id_token, are excluded from them.- Since:
- 1.0.0
- Author:
- Mark Allen
-
Method Summary
Modifier and TypeMethodDescriptionReturns the raw access token.Returns the application data authenticated in the pending browser authorization, after code completion.Returns the access-token expiry, when supplied.Returns granted scopes.getParameter(@NonNull String name) Returns one unknown non-token JSON member.Returns the instant at which this token request began.Returns a replacement refresh token when supplied.getScope()Returns the authorization server's scope member exactly when it supplied one.Returns unknown non-token JSON members only.toString()Redacts all tokens and parameters.
-
Method Details
-
getAccessToken
Returns the raw access token.- Returns:
- the token
- Since:
- 1.0.0
-
getRefreshToken
Returns a replacement refresh token when supplied. If absent, callers retain their previous token.- Returns:
- the replacement
- Since:
- 1.0.0
-
getScope
-
getGrantedScopes
-
getExpiresAt
Returns the access-token expiry, when supplied.- Returns:
- expiry
- Since:
- 1.0.0
-
getReceivedAt
Returns the instant at which this token request began. Expiry is anchored to this instant.- Returns:
- request start
- Since:
- 1.0.0
-
getApplicationData
Returns the application data authenticated in the pending browser authorization, after code completion. It is empty for other grants. The application must still allowlist any value used as a redirect destination.- Returns:
- immutable application data
- Since:
- 1.0.0
-
getParameter
-
toJsonObject
Returns unknown non-token JSON members only.- Returns:
- a safe JSON object
- Since:
- 1.0.0
-
toString
-