Class OAuth2UserRequest
- java.lang.Object
-
- org.springframework.security.oauth2.client.userinfo.OAuth2UserRequest
-
- Direct Known Subclasses:
OidcUserRequest
public class OAuth2UserRequest extends java.lang.Object
Represents a request theOAuth2UserService
uses when initiating a request to the UserInfo Endpoint.- Since:
- 5.0
- See Also:
ClientRegistration
,OAuth2AccessToken
,OAuth2UserService
-
-
Constructor Summary
Constructors Constructor Description OAuth2UserRequest(ClientRegistration clientRegistration, OAuth2AccessToken accessToken)
Constructs anOAuth2UserRequest
using the provided parameters.OAuth2UserRequest(ClientRegistration clientRegistration, OAuth2AccessToken accessToken, java.util.Map<java.lang.String,java.lang.Object> additionalParameters)
Constructs anOAuth2UserRequest
using the provided parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OAuth2AccessToken
getAccessToken()
Returns theaccess token
.java.util.Map<java.lang.String,java.lang.Object>
getAdditionalParameters()
Returns the additional parameters that may be used in the request.ClientRegistration
getClientRegistration()
Returns theclient registration
.
-
-
-
Constructor Detail
-
OAuth2UserRequest
public OAuth2UserRequest(ClientRegistration clientRegistration, OAuth2AccessToken accessToken)
Constructs anOAuth2UserRequest
using the provided parameters.- Parameters:
clientRegistration
- the client registrationaccessToken
- the access token
-
OAuth2UserRequest
public OAuth2UserRequest(ClientRegistration clientRegistration, OAuth2AccessToken accessToken, java.util.Map<java.lang.String,java.lang.Object> additionalParameters)
Constructs anOAuth2UserRequest
using the provided parameters.- Parameters:
clientRegistration
- the client registrationaccessToken
- the access tokenadditionalParameters
- the additional parameters, may be empty- Since:
- 5.1
-
-
Method Detail
-
getClientRegistration
public ClientRegistration getClientRegistration()
Returns theclient registration
.- Returns:
- the
ClientRegistration
-
getAccessToken
public OAuth2AccessToken getAccessToken()
Returns theaccess token
.- Returns:
- the
OAuth2AccessToken
-
getAdditionalParameters
public java.util.Map<java.lang.String,java.lang.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
-
-