Class OAuth2UserRequest

java.lang.Object
org.springframework.security.oauth2.client.userinfo.OAuth2UserRequest
Direct Known Subclasses:
OidcUserRequest

public class OAuth2UserRequest extends Object
Represents a request the OAuth2UserService uses when initiating a request to the UserInfo Endpoint.
Since:
5.0
See Also:
  • Constructor Details

    • OAuth2UserRequest

      public OAuth2UserRequest(ClientRegistration clientRegistration, org.springframework.security.oauth2.core.OAuth2AccessToken accessToken)
      Constructs an OAuth2UserRequest using the provided parameters.
      Parameters:
      clientRegistration - the client registration
      accessToken - the access token
    • OAuth2UserRequest

      public OAuth2UserRequest(ClientRegistration clientRegistration, org.springframework.security.oauth2.core.OAuth2AccessToken accessToken, Map<String,Object> additionalParameters)
      Constructs an OAuth2UserRequest using the provided parameters.
      Parameters:
      clientRegistration - the client registration
      accessToken - the access token
      additionalParameters - the additional parameters, may be empty
      Since:
      5.1
  • Method Details

    • getClientRegistration

      public ClientRegistration getClientRegistration()
      Returns the client registration.
      Returns:
      the ClientRegistration
    • getAccessToken

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

      public Map<String,Object> getAdditionalParameters()
      Returns the additional parameters that may be used in the request.
      Returns:
      a Map of the additional parameters, may be empty.
      Since:
      5.1