T - the type of token@ThreadSafe public final class AuthenticationTokenContext<T> extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
AuthenticationTokenContext.Builder<T>
A non-thread safe builder of
AuthenticationTokenContext instances. |
| Constructor and Description |
|---|
AuthenticationTokenContext(Class<T> tokenClass)
Creates a basic context for any purpose.
|
| Modifier and Type | Method and Description |
|---|---|
static <T> AuthenticationTokenContext.Builder<T> |
builder(Class<T> tokenClass)
Creates a
AuthenticationTokenContext.Builder for contexts of the specified token type. |
boolean |
canHave(Object purpose,
Object... validValues)
Checks if the context specifies the supplied purpose and matches against the valid values.
|
Class<T> |
getTokenClass()
Returns the type of token.
|
boolean |
mustHave(Object purpose,
Object... validValues)
Ensures the context specifies the supplied purpose matching against the valid values.
|
public static <T> AuthenticationTokenContext.Builder<T> builder(@NonNull Class<T> tokenClass)
AuthenticationTokenContext.Builder for contexts of the specified token type.T - the type of token.tokenClass - the type of token.AuthenticationTokenContext.Builder instance.@NonNull public Class<T> getTokenClass()
public boolean canHave(@NonNull
Object purpose,
Object... validValues)
purpose - the purpose.validValues - the valid values that the purpose must match if specified.true if either the purpose is not specified or the purpose is specified and is equal
to one of the specified values.public boolean mustHave(@NonNull
Object purpose,
Object... validValues)
purpose - the purpose.validValues - the valid values that the purpose must match.true if and only if the purpose is specified and is equal to one of the specified values.Copyright © 2004-2015. All Rights Reserved.