T - the type of the OAuth 2.0 Token@FunctionalInterface
public interface OAuth2TokenGenerator<T extends org.springframework.security.oauth2.core.OAuth2Token>
OAuth2Token
using the attributes contained in the OAuth2TokenContext.OAuth2Token,
OAuth2TokenContext,
OAuth2TokenClaimsSet,
ClaimAccessor| Modifier and Type | Method and Description |
|---|---|
T |
generate(OAuth2TokenContext context)
Generate an OAuth 2.0 Token using the attributes contained in the
OAuth2TokenContext,
or return null if the OAuth2TokenContext.getTokenType() is not supported. |
@Nullable T generate(OAuth2TokenContext context)
OAuth2TokenContext,
or return null if the OAuth2TokenContext.getTokenType() is not supported.
If the returned OAuth2Token has a set of claims, it should implement ClaimAccessor
in order for it to be stored with the OAuth2Authorization.
context - the context containing the OAuth 2.0 Token attributesOAuth2Token or null if the OAuth2TokenContext.getTokenType() is not supported