Class OAuth2RefreshTokenGrantRequest
- java.lang.Object
-
- org.springframework.security.oauth2.client.endpoint.AbstractOAuth2AuthorizationGrantRequest
-
- org.springframework.security.oauth2.client.endpoint.OAuth2RefreshTokenGrantRequest
-
public class OAuth2RefreshTokenGrantRequest extends AbstractOAuth2AuthorizationGrantRequest
An OAuth 2.0 Refresh Token Grant request that holds therefresh token
credential granted to theclient
.- Since:
- 5.2
- See Also:
AbstractOAuth2AuthorizationGrantRequest
,OAuth2RefreshToken
, Section 6 Refreshing an Access Token
-
-
Constructor Summary
Constructors Constructor Description OAuth2RefreshTokenGrantRequest(ClientRegistration clientRegistration, OAuth2AccessToken accessToken, OAuth2RefreshToken refreshToken)
Constructs anOAuth2RefreshTokenGrantRequest
using the provided parameters.OAuth2RefreshTokenGrantRequest(ClientRegistration clientRegistration, OAuth2AccessToken accessToken, OAuth2RefreshToken refreshToken, java.util.Set<java.lang.String> scopes)
Constructs anOAuth2RefreshTokenGrantRequest
using the provided parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OAuth2AccessToken
getAccessToken()
Returns theaccess token
credential granted.ClientRegistration
getClientRegistration()
Returns the authorized client'sregistration
.OAuth2RefreshToken
getRefreshToken()
Returns therefresh token
credential granted.java.util.Set<java.lang.String>
getScopes()
Returns the scope(s) to request.-
Methods inherited from class org.springframework.security.oauth2.client.endpoint.AbstractOAuth2AuthorizationGrantRequest
getGrantType
-
-
-
-
Constructor Detail
-
OAuth2RefreshTokenGrantRequest
public OAuth2RefreshTokenGrantRequest(ClientRegistration clientRegistration, OAuth2AccessToken accessToken, OAuth2RefreshToken refreshToken)
Constructs anOAuth2RefreshTokenGrantRequest
using 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, OAuth2AccessToken accessToken, OAuth2RefreshToken refreshToken, java.util.Set<java.lang.String> scopes)
Constructs anOAuth2RefreshTokenGrantRequest
using 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 Detail
-
getClientRegistration
public ClientRegistration getClientRegistration()
Returns the authorized client'sregistration
.- Returns:
- the
ClientRegistration
-
getAccessToken
public OAuth2AccessToken getAccessToken()
Returns theaccess token
credential granted.- Returns:
- the
OAuth2AccessToken
-
getRefreshToken
public OAuth2RefreshToken getRefreshToken()
Returns therefresh token
credential granted.- Returns:
- the
OAuth2RefreshToken
-
getScopes
public java.util.Set<java.lang.String> getScopes()
Returns the scope(s) to request.- Returns:
- the scope(s) to request
-
-