public final class CompositeTokenProvider extends java.lang.Object implements TokenProvider
TokenProviders into a single
provider.PARAM_TOKEN_EXPIRATION, PARAM_TOKEN_LENGTH, PARAM_TOKEN_REFRESH| Modifier and Type | Method and Description |
|---|---|
@Nullable TokenInfo |
createToken(@NotNull Credentials credentials)
Issues a new login token for the user with the specified credentials
and returns the associated
TokenInfo. |
@Nullable TokenInfo |
createToken(@NotNull java.lang.String userId,
@NotNull java.util.Map<java.lang.String,?> attributes)
Issues a new login token for the user with the given
userId
and the specified attributes. |
boolean |
doCreateToken(@NotNull Credentials credentials)
Returns
true if the given credentials indicate that a new token
needs to be issued. |
@Nullable TokenInfo |
getTokenInfo(@NotNull java.lang.String token)
Retrieves the
TokenInfo associated with the specified login token
or null. |
static @NotNull TokenProvider |
newInstance(@NotNull java.util.List<? extends TokenProvider> providers) |
static @NotNull TokenProvider |
newInstance(TokenProvider... providers) |
@NotNull public static @NotNull TokenProvider newInstance(@NotNull TokenProvider... providers)
@NotNull public static @NotNull TokenProvider newInstance(@NotNull @NotNull java.util.List<? extends TokenProvider> providers)
public boolean doCreateToken(@NotNull
@NotNull Credentials credentials)
TokenProvidertrue if the given credentials indicate that a new token
needs to be issued.doCreateToken in interface TokenProvidercredentials - The current credentials.true if a new login token needs to be created, false otherwise.@Nullable public @Nullable TokenInfo createToken(@NotNull @NotNull Credentials credentials)
TokenProviderTokenInfo.createToken in interface TokenProvidercredentials - The current credentials.TokenInfo associated with the new login token or
null if no token has been created.@Nullable public @Nullable TokenInfo createToken(@NotNull @NotNull java.lang.String userId, @NotNull @NotNull java.util.Map<java.lang.String,?> attributes)
TokenProvideruserId
and the specified attributes.createToken in interface TokenProvideruserId - The identifier of the user for which a new token should
be created.attributes - The attributes associated with the new token.TokenInfo associated with the new login token or
null if no token has been created.@Nullable public @Nullable TokenInfo getTokenInfo(@NotNull @NotNull java.lang.String token)
TokenProviderTokenInfo associated with the specified login token
or null.getTokenInfo in interface TokenProvidertoken - A valid login token.TokenInfo associated with the specified login token
or null.Copyright © 2010 - 2023 Adobe. All Rights Reserved