Class JwtTypeValidator
java.lang.Object
org.springframework.security.oauth2.jwt.JwtTypeValidator
- All Implemented Interfaces:
org.springframework.security.oauth2.core.OAuth2TokenValidator<Jwt>
public final class JwtTypeValidator
extends Object
implements org.springframework.security.oauth2.core.OAuth2TokenValidator<Jwt>
A validator for the
typ header. Specifically for indicating the header values
that a given JwtDecoder will support.- Since:
- 6.5
-
Constructor Summary
ConstructorsConstructorDescriptionJwtTypeValidator(String... validTypes) JwtTypeValidator(Collection<String> validTypes) -
Method Summary
Modifier and TypeMethodDescriptionstatic JwtTypeValidatorjwt()Require that thetypheader beJWTor absentvoidsetAllowEmpty(boolean allowEmpty) Whether to allow thetypheader to be empty.org.springframework.security.oauth2.core.OAuth2TokenValidatorResult
-
Constructor Details
-
JwtTypeValidator
-
JwtTypeValidator
-
-
Method Details
-
jwt
Require that thetypheader beJWTor absent -
setAllowEmpty
public void setAllowEmpty(boolean allowEmpty) Whether to allow thetypheader to be empty. The default value isfalse -
validate
- Specified by:
validatein interfaceorg.springframework.security.oauth2.core.OAuth2TokenValidator<Jwt>
-