public class TokenUtils extends Object
| Constructor and Description |
|---|
TokenUtils() |
| Modifier and Type | Method and Description |
|---|---|
static TokenVerifier.Predicate<JsonWebToken> |
checkThat(BooleanSupplier function,
String errorEvent,
String errorMessage)
Returns a predicate for use in
TokenVerifier using the given boolean-returning function. |
static <T extends JsonWebToken> |
checkThat(Predicate<T> function,
String errorEvent,
String errorMessage)
Returns a predicate for use in
TokenVerifier using the given boolean-returning function. |
static <T extends JsonWebToken> |
onlyIf(Predicate<T> condition,
TokenVerifier.Predicate<T> predicate)
Returns a predicate that is applied only if the given
condition evaluates to . |
static <T extends JsonWebToken> |
predicates(TokenVerifier.Predicate<? super T>... predicate) |
public static TokenVerifier.Predicate<JsonWebToken> checkThat(BooleanSupplier function, String errorEvent, String errorMessage)
TokenVerifier using the given boolean-returning function.
When the function return false, this predicate throws a ExplainedTokenVerificationException
with message and errorEvent set from errorMessage and errorEvent, .function - errorEvent - errorMessage - public static <T extends JsonWebToken> TokenVerifier.Predicate<T> checkThat(Predicate<T> function, String errorEvent, String errorMessage)
TokenVerifier using the given boolean-returning function.
When the function return false, this predicate throws a ExplainedTokenVerificationException
with message and errorEvent set from errorMessage and errorEvent, .function - errorEvent - errorMessage - public static <T extends JsonWebToken> TokenVerifier.Predicate<T> onlyIf(Predicate<T> condition, TokenVerifier.Predicate<T> predicate)
condition evaluates to . In case
it evaluates to false, the predicate passes.T - condition - Condition guarding execution of the predicatepredicate - Predicate that gets tested if the condition evaluates to truepublic static <T extends JsonWebToken> TokenVerifier.Predicate<? super T>[] predicates(TokenVerifier.Predicate<? super T>... predicate)
Copyright © 2021 JBoss by Red Hat. All rights reserved.