Class OAuth2RefreshTokenGrantRequest
java.lang.Object
org.springframework.security.oauth2.client.endpoint.AbstractOAuth2AuthorizationGrantRequest
org.springframework.security.oauth2.client.endpoint.OAuth2RefreshTokenGrantRequest
An OAuth 2.0 Refresh Token Grant request that holds the
refresh token credential granted to the client.- Since:
- 5.2
- See Also:
-
AbstractOAuth2AuthorizationGrantRequestOAuth2RefreshToken- Section 6 Refreshing an Access Token
-
Constructor Summary
ConstructorsConstructorDescriptionOAuth2RefreshTokenGrantRequest(ClientRegistration clientRegistration, org.springframework.security.oauth2.core.OAuth2AccessToken accessToken, org.springframework.security.oauth2.core.OAuth2RefreshToken refreshToken) Constructs anOAuth2RefreshTokenGrantRequestusing the provided parameters.OAuth2RefreshTokenGrantRequest(ClientRegistration clientRegistration, org.springframework.security.oauth2.core.OAuth2AccessToken accessToken, org.springframework.security.oauth2.core.OAuth2RefreshToken refreshToken, Set<String> scopes) Constructs anOAuth2RefreshTokenGrantRequestusing the provided parameters. -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.oauth2.core.OAuth2AccessTokenReturns theaccess tokencredential granted.org.springframework.security.oauth2.core.OAuth2RefreshTokenReturns therefresh tokencredential granted.Returns the scope(s) to request.Methods inherited from class org.springframework.security.oauth2.client.endpoint.AbstractOAuth2AuthorizationGrantRequest
getClientRegistration, getGrantType
-
Constructor Details
-
OAuth2RefreshTokenGrantRequest
public OAuth2RefreshTokenGrantRequest(ClientRegistration clientRegistration, org.springframework.security.oauth2.core.OAuth2AccessToken accessToken, org.springframework.security.oauth2.core.OAuth2RefreshToken refreshToken) Constructs anOAuth2RefreshTokenGrantRequestusing the provided parameters.- Parameters:
clientRegistration- the authorized client's registrationaccessToken- the access token credential grantedrefreshToken- the refresh token credential granted
-
OAuth2RefreshTokenGrantRequest
public OAuth2RefreshTokenGrantRequest(ClientRegistration clientRegistration, org.springframework.security.oauth2.core.OAuth2AccessToken accessToken, org.springframework.security.oauth2.core.OAuth2RefreshToken refreshToken, Set<String> scopes) Constructs anOAuth2RefreshTokenGrantRequestusing the provided parameters.- Parameters:
clientRegistration- the authorized client's registrationaccessToken- the access token credential grantedrefreshToken- the refresh token credential grantedscopes- the scopes to request
-
-
Method Details
-
getAccessToken
public org.springframework.security.oauth2.core.OAuth2AccessToken getAccessToken()Returns theaccess tokencredential granted.- Returns:
- the
OAuth2AccessToken
-
getRefreshToken
public org.springframework.security.oauth2.core.OAuth2RefreshToken getRefreshToken()Returns therefresh tokencredential granted.- Returns:
- the
OAuth2RefreshToken
-
getScopes
Returns the scope(s) to request.- Returns:
- the scope(s) to request
-