Class OidcIdTokenValidator
java.lang.Object
org.springframework.security.oauth2.client.oidc.authentication.OidcIdTokenValidator
- All Implemented Interfaces:
OAuth2TokenValidator<Jwt>
An
OAuth2TokenValidator responsible for validating the claims in an
ID Token.- Since:
- 5.1
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidsetClockSkew(Duration clockSkew) Sets the maximum acceptable clock skew.Verify the validity and/or constraints of the provided OAuth 2.0 Token.
-
Constructor Details
-
OidcIdTokenValidator
-
-
Method Details
-
validate
Description copied from interface:OAuth2TokenValidatorVerify the validity and/or constraints of the provided OAuth 2.0 Token.- Specified by:
validatein interfaceOAuth2TokenValidator<Jwt>- Parameters:
idToken- an OAuth 2.0 token- Returns:
- OAuth2TokenValidationResult the success or failure detail of the validation
-
setClockSkew
Sets the maximum acceptable clock skew. The default is 60 seconds. The clock skew is used when validating theexpandiatclaims.- Parameters:
clockSkew- the maximum acceptable clock skew- Since:
- 5.2
-
setClock
- Parameters:
clock- the clock- Since:
- 5.3
-