Class JwtIssuedAtValidator
java.lang.Object
org.springframework.security.oauth2.jwt.JwtIssuedAtValidator
- All Implemented Interfaces:
OAuth2TokenValidator<Jwt>
- Since:
- 6.5
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs aJwtIssuedAtValidator
with the defaults.JwtIssuedAtValidator
(boolean required) Constructs aJwtIssuedAtValidator
using the provided parameters. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Sets theClock
used inInstant.now(Clock)
.void
setClockSkew
(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 aJwtIssuedAtValidator
with the defaults. -
JwtIssuedAtValidator
public JwtIssuedAtValidator(boolean required) Constructs aJwtIssuedAtValidator
using the provided parameters.
-
-
Method Details
-
validate
Description copied from interface:OAuth2TokenValidator
Verify the validity and/or constraints of the provided OAuth 2.0 Token.- Specified by:
validate
in 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 theClock
used inInstant.now(Clock)
.- Parameters:
clock
- the clock
-