public class OpenAmAccessTokenResolver extends Object implements AccessTokenResolver
OpenAmAccessTokenResolver knows how to resolve a given token identifier against an OpenAm instance.
Models an AccessTokenInfo as returned by the OpenAM tokeninfo endpoint.
curl https://openam.example.com:8443/openam/oauth2/tokeninfo?access_token=70e5776c-b0fa-4c70-9962-defb0e9c3cd6
Example of OpenAM returned Json value (for the previous request):
{
"scope": [
"email",
"profile"
],
"grant_type": "password",
"realm": "/",
"token_type": "Bearer",
"expires_in": 471,
"access_token": "70e5776c-b0fa-4c70-9962-defb0e9c3cd6",
"email": "",
"profile": ""
}
| Constructor and Description |
|---|
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 |
|---|---|
Promise<AccessTokenInfo,AccessTokenException> |
resolve(Context context,
String token)
Resolves a given access token against an 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 Promise<AccessTokenInfo,AccessTokenException> resolve(Context context, String token)
AccessTokenResolverresolve in interface AccessTokenResolvercontext - Context chain used to keep a relationship between requests (tracking)token - token identifier to be resolvedAccessTokenInfo (well-formed, known by the server),
or by an exceptionCopyright © 2025 Open Identity Platform Community. All rights reserved.