Uses of Class
org.keycloak.TokenVerifier
-
Uses of TokenVerifier in org.keycloak
Modifier and TypeMethodDescriptionAdd check for verifying that token contains the expectedAudienceTokenVerifier.checkActive
(boolean checkActive) Deprecated.TokenVerifier.checkRealmUrl
(boolean checkRealmUrl) Deprecated.This method is here only for backward compatibility with previous version ofTokenVerifier
.TokenVerifier.checkTokenType
(boolean checkTokenType) Deprecated.This method is here only for backward compatibility with previous version ofTokenVerifier
.static <T extends JsonWebToken>
TokenVerifier<T>Creates an instance ofTokenVerifier
from the given string on a JWT of the given class.static <T extends JsonWebToken>
TokenVerifier<T>TokenVerifier.createWithoutSignature
(T token) Creates an instance ofTokenVerifier
for the given token.Add check for verifying that token issuedFor (azp claim) is the expected valueTokenVerifier.parse()
Sets the key for verification of RSA-based signature.Deprecated.This method is here only for backward compatibility with previous version ofTokenVerifier
.Sets the key for verification of HMAC-based signature.TokenVerifier.verifierContext
(SignatureVerifierContext verifier) TokenVerifier.verify()
final TokenVerifier<T>
TokenVerifier.withChecks
(TokenVerifier.Predicate<? super T>... checks) Will test the given checks inverify()
method in addition to already set checks.TokenVerifier.withDefaultChecks()
Adds default checks to the token verification: Realm URL (JWT issuer field:iss
) has to be defined and match realm set viarealmUrl(java.lang.String)
method Subject (JWT subject field:sub
) has to be defined Token type (JWT type field:typ
) has to beBearer
.
TokenVerifier
.