@ProviderType public interface AccessTokenProvider
AccessTokenRequestCustomizer
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAccessToken(ResourceResolver resolver,
java.lang.String userId,
java.util.Map<java.lang.String,?> claims)
Return a valid access token or throws an exception.
|
java.lang.String getAccessToken(ResourceResolver resolver, java.lang.String userId, java.util.Map<java.lang.String,?> claims) throws CryptoException, java.io.IOException, java.lang.NullPointerException
Return a valid access token or throws an exception. A new access token is obtained from the authorization server
if needed, by generating a JWT and using it as authorization grant. Custom claims may be added via the
claim
parameter. The custom claims do override the claims computed by a AccessTokenProvider
implementation.
An implementation may or may not reuse the access tokens.
resolver
- The resource resolver to access the user associated to the userId
userId
- The user identifier which has access to the required asymmetric cryptographic materialclaims
- An optional map of JWT claims that overrides the claims computed by a AccessTokenProvider
implementation. Providing an empty map or null
uses the default
AccessTokenProvider
implementation claimsnull
)CryptoException
- If an error occurred while generating/signing the JWT claimjava.io.IOException
- If an error occurred while communicating with the authorization serverjava.lang.NullPointerException
- If the resolver
or the userId
is null
Copyright © 2010 - 2020 Adobe. All Rights Reserved