public class OpenAmAccessTokenResolver extends Object implements AccessTokenResolver
OpenAmAccessTokenResolver
knows how to resolve a given token identifier against an OpenAm instance.Constructor and Description |
---|
OpenAmAccessTokenResolver(Handler client,
OpenAmAccessToken.Builder builder,
String tokenInfoEndpoint)
Creates a new
OpenAmAccessTokenResolver configured to access the given /oauth2/tokeninfo
OpenAm endpoint. |
OpenAmAccessTokenResolver(Handler client,
TimeService time,
String tokenInfoEndpoint)
Creates a new
OpenAmAccessTokenResolver configured to access the given /oauth2/tokeninfo
OpenAm endpoint. |
Modifier and Type | Method and Description |
---|---|
AccessToken |
resolve(Context context,
String token)
Resolves a given access token against a authorization server.
|
public OpenAmAccessTokenResolver(Handler client, TimeService time, String tokenInfoEndpoint)
OpenAmAccessTokenResolver
configured to access the given /oauth2/tokeninfo
OpenAm endpoint.client
- Http client handler used to perform the requesttime
- Time service used to compute the token expiration timetokenInfoEndpoint
- full URL of the /oauth2/tokeninfo endpointpublic OpenAmAccessTokenResolver(Handler client, OpenAmAccessToken.Builder builder, String tokenInfoEndpoint)
OpenAmAccessTokenResolver
configured to access the given /oauth2/tokeninfo
OpenAm endpoint.client
- Http client handler used to perform the requestbuilder
- AccessToken buildertokenInfoEndpoint
- full URL of the /oauth2/tokeninfo endpointpublic AccessToken resolve(Context context, String token) throws OAuth2TokenException
AccessTokenResolver
resolve
in interface AccessTokenResolver
context
- Context chain used to keep a relationship between requests (tracking)token
- token identifier to be resolvedAccessToken
(well formed, known by the server)OAuth2TokenException
- if the token is unknown by the serverCopyright 2011-2015 ForgeRock AS.