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 the refresh token credential granted to the client.
Since:
5.2
See Also:
  • Constructor Details

    • OAuth2RefreshTokenGrantRequest

      public OAuth2RefreshTokenGrantRequest(ClientRegistration clientRegistration, org.springframework.security.oauth2.core.OAuth2AccessToken accessToken, org.springframework.security.oauth2.core.OAuth2RefreshToken refreshToken)
      Constructs an OAuth2RefreshTokenGrantRequest using the provided parameters.
      Parameters:
      clientRegistration - the authorized client's registration
      accessToken - the access token credential granted
      refreshToken - 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 an OAuth2RefreshTokenGrantRequest using the provided parameters.
      Parameters:
      clientRegistration - the authorized client's registration
      accessToken - the access token credential granted
      refreshToken - the refresh token credential granted
      scopes - the scopes to request
  • Method Details

    • getAccessToken

      public org.springframework.security.oauth2.core.OAuth2AccessToken getAccessToken()
      Returns the access token credential granted.
      Returns:
      the OAuth2AccessToken
    • getRefreshToken

      public org.springframework.security.oauth2.core.OAuth2RefreshToken getRefreshToken()
      Returns the refresh token credential granted.
      Returns:
      the OAuth2RefreshToken
    • getScopes

      public Set<String> getScopes()
      Returns the scope(s) to request.
      Returns:
      the scope(s) to request