Class OAuth2AccessTokenResponse
- java.lang.Object
-
- org.springframework.security.oauth2.core.endpoint.OAuth2AccessTokenResponse
-
public final class OAuth2AccessTokenResponse extends java.lang.ObjectA representation of an OAuth 2.0 Access Token Response.- Since:
- 5.0
- See Also:
OAuth2AccessToken,OAuth2RefreshToken, Section 5.1 Access Token Response
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classOAuth2AccessTokenResponse.BuilderA builder forOAuth2AccessTokenResponse.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description OAuth2AccessTokengetAccessToken()Returns theAccess Token.java.util.Map<java.lang.String,java.lang.Object>getAdditionalParameters()Returns the additional parameters returned in the response.OAuth2RefreshTokengetRefreshToken()Returns theRefresh Token.static OAuth2AccessTokenResponse.BuilderwithResponse(OAuth2AccessTokenResponse response)Returns a newOAuth2AccessTokenResponse.Builder, initialized with the provided response.static OAuth2AccessTokenResponse.BuilderwithToken(java.lang.String tokenValue)Returns a newOAuth2AccessTokenResponse.Builder, initialized with the provided access token value.
-
-
-
Method Detail
-
getAccessToken
public OAuth2AccessToken getAccessToken()
Returns theAccess Token.- Returns:
- the
OAuth2AccessToken
-
getRefreshToken
@Nullable public OAuth2RefreshToken getRefreshToken()
Returns theRefresh Token.- Returns:
- the
OAuth2RefreshToken - Since:
- 5.1
-
getAdditionalParameters
public java.util.Map<java.lang.String,java.lang.Object> getAdditionalParameters()
Returns the additional parameters returned in the response.- Returns:
- a
Mapof the additional parameters returned in the response, may be empty.
-
withToken
public static OAuth2AccessTokenResponse.Builder withToken(java.lang.String tokenValue)
Returns a newOAuth2AccessTokenResponse.Builder, initialized with the provided access token value.- Parameters:
tokenValue- the value of the access token- Returns:
- the
OAuth2AccessTokenResponse.Builder
-
withResponse
public static OAuth2AccessTokenResponse.Builder withResponse(OAuth2AccessTokenResponse response)
Returns a newOAuth2AccessTokenResponse.Builder, initialized with the provided response.- Parameters:
response- the response to initialize the builder with- Returns:
- the
OAuth2AccessTokenResponse.Builder
-
-