Package org.forgerock.oauth2.core
Class TokenInfoService
- java.lang.Object
-
- org.forgerock.oauth2.core.TokenInfoService
-
@Singleton public class TokenInfoService extends Object
Service to return the full information of a OAuth2 token.- Since:
- 12.0.0
-
-
Constructor Summary
Constructors Constructor Description TokenInfoService(OAuth2ProviderSettingsFactory providerSettingsFactory, AccessTokenVerifier headerTokenVerifier, AccessTokenVerifier queryTokenVerifier, ClientRegistrationStore clientRegistrationStore)
Constructs a new TokenInfoServiceImpl.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.forgerock.json.JsonValue
getTokenInfo(OAuth2Request request)
Returns a Json representation of the token's information that is on the OAuth2 request.
-
-
-
Constructor Detail
-
TokenInfoService
@Inject public TokenInfoService(OAuth2ProviderSettingsFactory providerSettingsFactory, @Named("realm-agnostic-header") AccessTokenVerifier headerTokenVerifier, @Named("realm-agnostic-query-param") AccessTokenVerifier queryTokenVerifier, ClientRegistrationStore clientRegistrationStore)
Constructs a new TokenInfoServiceImpl.- Parameters:
providerSettingsFactory
- An instance of the OAuth2ProviderSettingsFactory.headerTokenVerifier
- Basic HTTP access token verification.queryTokenVerifier
- Query string access token verification.clientRegistrationStore
- An instance of the ClientRegistrationStore.
-
-
Method Detail
-
getTokenInfo
public org.forgerock.json.JsonValue getTokenInfo(OAuth2Request request) throws InvalidTokenException, InvalidRequestException, ExpiredTokenException, ServerException, BadRequestException, InvalidGrantException, NotFoundException
Returns a Json representation of the token's information that is on the OAuth2 request.- Parameters:
request
- The OAuth2 request.- Returns:
- The token's information.
- Throws:
InvalidRequestException
- If the request is missing any required parameters or is otherwise malformed.ServerException
- If any internal server error occurs.BadRequestException
- If the request is malformed.InvalidGrantException
- If the given token is not an Access token.NotFoundException
- If the realm does not have an OAuth 2.0 provider service.InvalidTokenException
ExpiredTokenException
-
-