Package org.forgerock.openidconnect
Class UserInfoService
- java.lang.Object
-
- org.forgerock.openidconnect.UserInfoService
-
public class UserInfoService extends Object
Service for retrieving user's information from the access token the user granted the authorization.- Since:
- 12.0.0
-
-
Constructor Summary
Constructors Constructor Description UserInfoService(TokenStore tokenStore, OAuth2ProviderSettingsFactory providerSettingsFactory, AccessTokenVerifier headerTokenVerifier, AccessTokenVerifier formTokenVerifier, ClientRegistrationStore clientRegistrationStore)Constructs a new UserInfoServiceImpl.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.forgerock.json.JsonValuegetUserInfo(OAuth2Request request)Gets the user's information for the specified access token.
-
-
-
Constructor Detail
-
UserInfoService
@Inject public UserInfoService(TokenStore tokenStore, OAuth2ProviderSettingsFactory providerSettingsFactory, @Named("header") AccessTokenVerifier headerTokenVerifier, @Named("form-body") AccessTokenVerifier formTokenVerifier, ClientRegistrationStore clientRegistrationStore)
Constructs a new UserInfoServiceImpl.- Parameters:
tokenStore- An instance of the TokenStore.providerSettingsFactory- An instance of the OAuth2ProviderSettingsFactory.headerTokenVerifier- An instance of the AccessTokenVerifier to validate Authorization header.formTokenVerifier- An instance of the AccessTokenVerifier to validate form body.clientRegistrationStore- An instance of the client registration store.
-
-
Method Detail
-
getUserInfo
public org.forgerock.json.JsonValue getUserInfo(OAuth2Request request) throws OAuth2Exception
Gets the user's information for the specified access token.- Parameters:
request- The OAuth2 request.- Returns:
- A JsonValue of the user's information.
- Throws:
OAuth2Exception- If there is any issue in getting the user information.
-
-