Class JwtIssuedAtValidator
java.lang.Object
org.springframework.security.oauth2.jwt.JwtIssuedAtValidator
- All Implemented Interfaces:
OAuth2TokenValidator<Jwt>
- Since:
- 6.5
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs aJwtIssuedAtValidatorwith the defaults.JwtIssuedAtValidator(boolean required) Constructs aJwtIssuedAtValidatorusing the provided parameters. -
Method Summary
Modifier and TypeMethodDescriptionvoidSets theClockused inInstant.now(Clock).voidsetClockSkew(Duration clockSkew) Sets the clock skew.Verify the validity and/or constraints of the provided OAuth 2.0 Token.
-
Constructor Details
-
JwtIssuedAtValidator
public JwtIssuedAtValidator()Constructs aJwtIssuedAtValidatorwith the defaults. -
JwtIssuedAtValidator
public JwtIssuedAtValidator(boolean required) Constructs aJwtIssuedAtValidatorusing the provided parameters.
-
-
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:
jwt- an OAuth 2.0 token- Returns:
- OAuth2TokenValidationResult the success or failure detail of the validation
-
setClockSkew
Sets the clock skew. The default is 60 seconds.- Parameters:
clockSkew- the clock skew
-
setClock
Sets theClockused inInstant.now(Clock).- Parameters:
clock- the clock
-