Class JwtValidators
java.lang.Object
org.springframework.security.oauth2.jwt.JwtValidators
Provides factory methods for creating
OAuth2TokenValidator<Jwt>
- Since:
- 5.1
-
Method Summary
Modifier and TypeMethodDescriptionstatic OAuth2TokenValidator<Jwt>
Create aJwt
Validator that contains all standard validators.static OAuth2TokenValidator<Jwt>
createDefaultWithIssuer
(String issuer) Create aJwt
Validator that contains all standard validators when an issuer is known.static OAuth2TokenValidator<Jwt>
createDefaultWithValidators
(List<OAuth2TokenValidator<Jwt>> validators) Create aJwt
default validator with standard validators and additional validators.static OAuth2TokenValidator<Jwt>
createDefaultWithValidators
(OAuth2TokenValidator<Jwt>... validators) Create aJwt
default validator with standard validators and additional validators.
-
Method Details
-
createDefaultWithIssuer
Create a
Jwt
Validator that contains all standard validators when an issuer is known.User's wanting to leverage the defaults plus additional validation can add the result of this method to
DelegatingOAuth2TokenValidator
along with the additional validators.- Parameters:
issuer
- the issuer- Returns:
- - a delegating validator containing all standard validators as well as any supplied
-
createDefault
Create a
Jwt
Validator that contains all standard validators.User's wanting to leverage the defaults plus additional validation can add the result of this method to
DelegatingOAuth2TokenValidator
along with the additional validators.- Returns:
- - a delegating validator containing all standard validators as well as any supplied
-
createDefaultWithValidators
public static OAuth2TokenValidator<Jwt> createDefaultWithValidators(List<OAuth2TokenValidator<Jwt>> validators) Create a
Jwt
default validator with standard validators and additional validators.- Parameters:
validators
- additional validators- Returns:
- - a delegating validator containing all standard validators with additional validators
- Since:
- 6.3
-
createDefaultWithValidators
public static OAuth2TokenValidator<Jwt> createDefaultWithValidators(OAuth2TokenValidator<Jwt>... validators) Create a
Jwt
default validator with standard validators and additional validators.- Parameters:
validators
- additional validators- Returns:
- - a delegating validator containing all standard validators with additional validators
- Since:
- 6.3
-