Class OAuth2TokenResponse
java.lang.Object
com.sap.cloud.security.xsuaa.client.OAuth2TokenResponse
-
Constructor Summary
ConstructorsConstructorDescriptionOAuth2TokenResponse(String accessToken, long expiredInSeconds, String refreshToken) OAuth2TokenResponse(String accessToken, long expiredInSeconds, String refreshToken, String tokenType) -
Method Summary
Modifier and TypeMethodDescriptionAn OAuth2 access token.A decoded OAuth2 access token.Returns the moment in time when the token will be expired.An OAuth2 refresh token.toString()
-
Constructor Details
-
OAuth2TokenResponse
-
OAuth2TokenResponse
-
-
Method Details
-
getAccessToken
An OAuth2 access token. This token will be a JSON Web Token suitable for offline validation by OAuth2 Resource Servers.- Returns:
- the encoded access token
-
getDecodedAccessToken
A decoded OAuth2 access token.- Returns:
- the decoded access token
-
getExpiredAt
Returns the moment in time when the token will be expired.- Returns:
- the expiration point in time if present.
-
getRefreshToken
An OAuth2 refresh token. Clients typically use the refresh token to obtain a new access token without the need for the user to authenticate again.Note with version 2.5.0 the UserTokenFlow (Jwt Bearer) does not provide any longer Refresh Token.
- Returns:
- the refresh token - can only be used once!
-
getTokenType
-
toString
-