keycloak
|
クラス | |
class | AudienceCheck |
interface | Predicate |
class | RealmUrlCheck |
class | TokenTypeCheck |
公開メンバ関数 | |
TokenVerifier< T > | verifierContext (SignatureVerifierContext verifier) |
TokenVerifier< T > | withDefaultChecks () |
TokenVerifier< T > | withChecks (Predicate<? super T >... checks) |
TokenVerifier< T > | publicKey (PublicKey publicKey) |
TokenVerifier< T > | secretKey (SecretKey secretKey) |
TokenVerifier< T > | realmUrl (String realmUrl) |
TokenVerifier< T > | checkTokenType (boolean checkTokenType) |
TokenVerifier< T > | tokenType (String tokenType) |
TokenVerifier< T > | checkActive (boolean checkActive) |
TokenVerifier< T > | checkRealmUrl (boolean checkRealmUrl) |
TokenVerifier< T > | audience (String expectedAudience) |
TokenVerifier< T > | parse () throws VerificationException |
T | getToken () throws VerificationException |
JWSHeader | getHeader () throws VerificationException |
void | verifySignature () throws VerificationException |
TokenVerifier< T > | verify () throws VerificationException |
静的公開メンバ関数 | |
static< T extends JsonWebToken > TokenVerifier< T > | create (String tokenString, Class< T > clazz) |
static< T extends JsonWebToken > TokenVerifier< T > | createWithoutSignature (T token) |
static< T extends JsonWebToken > Predicate< T > | optional (final Predicate< T > mandatoryPredicate) |
static< T extends JsonWebToken > Predicate< T > | alternative (final Predicate<? super T >... predicates) |
静的公開変数類 | |
static final Predicate< JsonWebToken > | SUBJECT_EXISTS_CHECK |
static final Predicate< JsonWebToken > | IS_ACTIVE |
限定公開メンバ関数 | |
TokenVerifier (String tokenString, Class< T > clazz) | |
TokenVerifier (T token) | |
関数 | |
private< P extends Predicate<? super T > > TokenVerifier< T > | replaceCheck (Class<? extends Predicate<?>> checkClass, boolean active, P predicate) |
private< P extends Predicate<? super T > > TokenVerifier< T > | replaceCheck (Predicate<? super T > check, boolean active, P predicate) |
非公開メンバ関数 | |
void | removeCheck (Class<? extends Predicate<?>> checkClass) |
void | removeCheck (Predicate<? super T > check) |
非公開変数類 | |
String | tokenString |
Class<? extends T > | clazz |
PublicKey | publicKey |
SecretKey | secretKey |
String | realmUrl |
String | expectedTokenType = TokenUtil.TOKEN_TYPE_BEARER |
boolean | checkTokenType = true |
boolean | checkRealmUrl = true |
final LinkedList< Predicate<? super T > > | checks = new LinkedList<>() |
JWSInput | jws |
T | token |
SignatureVerifierContext | verifier = null |
静的非公開変数類 | |
static final Logger | LOG = Logger.getLogger(TokenVerifier.class.getName()) |
|
inlineprotected |
|
inlineprotected |
|
inlinestatic |
Creates a predicate that will proceed with checks of the given predicates and will pass if and only if at least one of the given predicates passes.
<T> | |
predicates |
|
inline |
Add check for verifying that token contains the expectedAudience
expectedAudience | Audience, which needs to be in the target token. Can't be null |
|
inline |
.
|
inline |
.
|
inline |
.
|
inlinestatic |
Creates an instance of
from the given string on a JWT of the given class. The token verifier has no checks defined. Note that the checks are only tested when verify() method is invoked.
<T> | Type of the token |
tokenString | String representation of JWT |
clazz | Class of the token |
|
inlinestatic |
Creates an instance of
for the given token. The token verifier has no checks defined. Note that the checks are only tested when verify() method is invoked.
NOTE: The returned token verifier cannot verify token signature since that is not part of the JsonWebToken object.
|
inline |
|
inline |
|
inlinestatic |
Creates an optional predicate from a predicate that will proceed with check but always pass.
<T> | |
mandatoryPredicate |
|
inline |
|
inline |
Sets the key for verification of RSA-based signature.
publicKey |
|
inline |
.
|
inlineprivate |
|
inlineprivate |
|
inlinepackage |
|
inlinepackage |
|
inline |
Sets the key for verification of HMAC-based signature.
secretKey |
|
inline |
.
|
inline |
|
inline |
|
inline |
|
inline |
Will test the given checks in verify() method in addition to already set checks.
checks |
|
inline |
Adds default checks to the token verification:
|
private |
|
private |
|
private |
|
private |
|
private |
|
static |
Check for token being neither expired nor used before it gets valid.
|
private |
|
staticprivate |
|
private |
|
private |
|
private |
|
static |
|
private |
|
private |
|
private |