Package | Description |
---|---|
org.keycloak | |
org.keycloak.adapters.rotation |
Modifier and Type | Method and Description |
---|---|
TokenVerifier<T> |
TokenVerifier.audience(String expectedAudience)
Add check for verifying that token contains the expectedAudience
|
TokenVerifier<T> |
TokenVerifier.checkActive(boolean checkActive)
Deprecated.
This method is here only for backward compatibility with previous version of
TokenVerifier . |
TokenVerifier<T> |
TokenVerifier.checkRealmUrl(boolean checkRealmUrl)
Deprecated.
This method is here only for backward compatibility with previous version of
TokenVerifier . |
TokenVerifier<T> |
TokenVerifier.checkTokenType(boolean checkTokenType)
Deprecated.
This method is here only for backward compatibility with previous version of
TokenVerifier . |
static <T extends JsonWebToken> |
TokenVerifier.create(String tokenString,
Class<T> clazz)
Creates an instance of
TokenVerifier from the given string on a JWT of the given class. |
static <T extends JsonWebToken> |
TokenVerifier.createWithoutSignature(T token)
Creates an instance of
TokenVerifier for the given token. |
TokenVerifier<T> |
TokenVerifier.issuedFor(String expectedIssuedFor)
Add check for verifying that token issuedFor (azp claim) is the expected value
|
TokenVerifier<T> |
TokenVerifier.parse() |
TokenVerifier<T> |
TokenVerifier.publicKey(PublicKey publicKey)
Sets the key for verification of RSA-based signature.
|
TokenVerifier<T> |
TokenVerifier.realmUrl(String realmUrl)
Deprecated.
This method is here only for backward compatibility with previous version of
TokenVerifier . |
TokenVerifier<T> |
TokenVerifier.secretKey(SecretKey secretKey)
Sets the key for verification of HMAC-based signature.
|
TokenVerifier<T> |
TokenVerifier.tokenType(String tokenType)
Deprecated.
This method is here only for backward compatibility with previous version of
TokenVerifier . |
TokenVerifier<T> |
TokenVerifier.verifierContext(SignatureVerifierContext verifier) |
TokenVerifier<T> |
TokenVerifier.verify() |
TokenVerifier<T> |
TokenVerifier.withChecks(TokenVerifier.Predicate<? super T>... checks)
Will test the given checks in
verify() method in addition to already set checks. |
TokenVerifier<T> |
TokenVerifier.withDefaultChecks()
Adds default checks to the token verification:
Realm URL (JWT issuer field:
iss ) has to be defined and match realm set via realmUrl(java.lang.String) method
Subject (JWT subject field: sub ) has to be defined
Token type (JWT type field: typ ) has to be Bearer . |
Modifier and Type | Method and Description |
---|---|
static <T extends JsonWebToken> |
AdapterTokenVerifier.createVerifier(String tokenString,
KeycloakDeployment deployment,
boolean withDefaultChecks,
Class<T> tokenClass)
Creates verifier, initializes it from the KeycloakDeployment and adds the publicKey and some default basic checks (activeness and tokenType).
|
Copyright © 2019 JBoss by Red Hat. All rights reserved.