Uses of Class
org.keycloak.TokenVerifier
-
Packages that use TokenVerifier Package Description org.keycloak -
-
Uses of TokenVerifier in org.keycloak
Methods in org.keycloak that return TokenVerifier Modifier and Type Method Description TokenVerifier<T>
TokenVerifier. audience(String... expectedAudiences)
Add check for verifying that token contains the expectedAudienceTokenVerifier<T>
TokenVerifier. checkActive(boolean checkActive)
Deprecated.This method is here only for backward compatibility with previous version ofTokenVerifier
.TokenVerifier<T>
TokenVerifier. checkRealmUrl(boolean checkRealmUrl)
Deprecated.This method is here only for backward compatibility with previous version ofTokenVerifier
.TokenVerifier<T>
TokenVerifier. checkTokenType(boolean checkTokenType)
Deprecated.This method is here only for backward compatibility with previous version ofTokenVerifier
.static <T extends JsonWebToken>
TokenVerifier<T>TokenVerifier. create(String tokenString, Class<T> clazz)
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.TokenVerifier<T>
TokenVerifier. issuedFor(String expectedIssuedFor)
Add check for verifying that token issuedFor (azp claim) is the expected valueTokenVerifier<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 ofTokenVerifier
.TokenVerifier<T>
TokenVerifier. secretKey(SecretKey secretKey)
Sets the key for verification of HMAC-based signature.TokenVerifier<T>
TokenVerifier. tokenType(String tokenType)
TokenVerifier<T>
TokenVerifier. verifierContext(SignatureVerifierContext verifier)
TokenVerifier<T>
TokenVerifier. verify()
TokenVerifier<T>
TokenVerifier. withChecks(TokenVerifier.Predicate<? super T>... checks)
Will test the given checks inverify()
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 viarealmUrl(java.lang.String)
method Subject (JWT subject field:sub
) has to be defined Token type (JWT type field:typ
) has to beBearer
.
-