parent
ff19f04fca
commit
ee42ad2c8c
|
@ -52,10 +52,7 @@ public final class JwtValidators {
|
||||||
* supplied
|
* supplied
|
||||||
*/
|
*/
|
||||||
public static OAuth2TokenValidator<Jwt> createDefaultWithIssuer(String issuer) {
|
public static OAuth2TokenValidator<Jwt> createDefaultWithIssuer(String issuer) {
|
||||||
List<OAuth2TokenValidator<Jwt>> validators = new ArrayList<>();
|
return createDefaultWithValidators(new JwtIssuerValidator(issuer));
|
||||||
validators.add(new JwtTimestampValidator());
|
|
||||||
validators.add(new JwtIssuerValidator(issuer));
|
|
||||||
return new DelegatingOAuth2TokenValidator<>(validators);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -90,7 +87,7 @@ public final class JwtValidators {
|
||||||
JwtTimestampValidator jwtTimestampValidator = CollectionUtils.findValueOfType(tokenValidators,
|
JwtTimestampValidator jwtTimestampValidator = CollectionUtils.findValueOfType(tokenValidators,
|
||||||
JwtTimestampValidator.class);
|
JwtTimestampValidator.class);
|
||||||
if (jwtTimestampValidator == null) {
|
if (jwtTimestampValidator == null) {
|
||||||
tokenValidators.add(new JwtTimestampValidator());
|
tokenValidators.add(0, new JwtTimestampValidator());
|
||||||
}
|
}
|
||||||
return new DelegatingOAuth2TokenValidator<>(tokenValidators);
|
return new DelegatingOAuth2TokenValidator<>(tokenValidators);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue