Package org.wildfly.security.http.oidc
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.parseAndVerifyToken(String bearerToken) 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.
-
Method Details
-
parseAndVerifyToken
public TokenValidator.VerifiedTokens parseAndVerifyToken(String idToken, String accessToken) throws OidcException - 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:
bearerToken- the bearer token- Returns:
- the
AccessTokenif the bearer token was valid - Throws:
OidcException- if the bearer token is invalid
-
builder
Construct a new builder instance.- Parameters:
clientConfiguration- the OIDC client configuration- Returns:
- the new builder instance
-