File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
oauth2/oauth2-jose/src/main/java/org/springframework/security/oauth2/jwt Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -52,10 +52,7 @@ private JwtValidators() {
52
52
* supplied
53
53
*/
54
54
public static OAuth2TokenValidator <Jwt > createDefaultWithIssuer (String issuer ) {
55
- List <OAuth2TokenValidator <Jwt >> validators = new ArrayList <>();
56
- validators .add (new JwtTimestampValidator ());
57
- validators .add (new JwtIssuerValidator (issuer ));
58
- return new DelegatingOAuth2TokenValidator <>(validators );
55
+ return createDefaultWithValidators (new JwtIssuerValidator (issuer ));
59
56
}
60
57
61
58
/**
@@ -90,7 +87,7 @@ public static OAuth2TokenValidator<Jwt> createDefaultWithValidators(List<OAuth2T
90
87
JwtTimestampValidator jwtTimestampValidator = CollectionUtils .findValueOfType (tokenValidators ,
91
88
JwtTimestampValidator .class );
92
89
if (jwtTimestampValidator == null ) {
93
- tokenValidators .add (new JwtTimestampValidator ());
90
+ tokenValidators .add (0 , new JwtTimestampValidator ());
94
91
}
95
92
return new DelegatingOAuth2TokenValidator <>(tokenValidators );
96
93
}
You can’t perform that action at this time.
0 commit comments