Class TokenValidator
java.lang.Object
org.wildfly.security.http.oidc.TokenValidator
Validator for an ID token or bearer token, as per OpenID Connect Core 1.0
and RFC 7523.
- Author:
- Farah Juma
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Method Summary
Modifier and TypeMethodDescriptionstatic TokenValidator.Builderbuilder(OidcClientConfiguration clientConfiguration) Construct a new builder instance.org.jose4j.jwt.JwtClaimsparseAndVerifyLogoutToken(String token) parseAndVerifyToken(String token) Parse and verify the given bearer token.parseAndVerifyToken(String idToken, String accessToken) parseAndVerifyToken(String idToken, String accessToken, OidcHttpFacade.Cookie cookie, boolean isValidateNonce) Parse and verify the given ID token.org.jose4j.jwt.JwtClaims
-
Method Details
-
parseAndVerifyToken
public TokenValidator.VerifiedTokens parseAndVerifyToken(String idToken, String accessToken) throws OidcException - Throws:
OidcException
-
parseAndVerifyLogoutToken
- Throws:
OidcException
-
parseAndVerifyToken
public TokenValidator.VerifiedTokens parseAndVerifyToken(String idToken, String accessToken, OidcHttpFacade.Cookie cookie, boolean isValidateNonce) throws OidcException Parse and verify the given ID token.- Parameters:
idToken- the ID token- Returns:
- the
VerifiedTokensif the ID token was valid - Throws:
OidcException- if the ID token is invalid
-
parseAndVerifyToken
Parse and verify the given bearer token.- Parameters:
token- the bearer token- Returns:
- the
AccessTokenif the bearer token was valid - Throws:
OidcException- if the bearer token is invalid
-
verify
- Throws:
OidcException
-
builder
Construct a new builder instance.- Parameters:
clientConfiguration- the OIDC client configuration- Returns:
- the new builder instance
-