File tree Expand file tree Collapse file tree 3 files changed +8
-5
lines changed
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/resource Expand file tree Collapse file tree 3 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 47
47
import org .springframework .security .core .userdetails .MapReactiveUserDetailsService ;
48
48
import org .springframework .security .oauth2 .core .DelegatingOAuth2TokenValidator ;
49
49
import org .springframework .security .oauth2 .core .OAuth2TokenValidator ;
50
+ import org .springframework .security .oauth2 .jose .jws .SignatureAlgorithm ;
50
51
import org .springframework .security .oauth2 .jwt .Jwt ;
51
52
import org .springframework .security .oauth2 .jwt .JwtIssuerValidator ;
52
53
import org .springframework .security .oauth2 .jwt .NimbusReactiveJwtDecoder ;
@@ -105,8 +106,8 @@ void autoConfigurationUsingJwkSetUriShouldConfigureResourceServerUsingJwsAlgorit
105
106
"spring.security.oauth2.resourceserver.jwt.jws-algorithm=RS512" )
106
107
.run ((context ) -> {
107
108
NimbusReactiveJwtDecoder nimbusReactiveJwtDecoder = context .getBean (NimbusReactiveJwtDecoder .class );
108
- assertThat (nimbusReactiveJwtDecoder ).extracting ("jwtProcessor.arg$2" )
109
- . matches (( algorithms ) -> ((Set <JWSAlgorithm >) algorithms ).contains (JWSAlgorithm .RS512 ));
109
+ assertThat (nimbusReactiveJwtDecoder ).extracting ("jwtProcessor.arg$1.signatureAlgorithms" ). matches (
110
+ ( algorithms ) -> ((Set <SignatureAlgorithm >) algorithms ).contains (SignatureAlgorithm .RS512 ));
110
111
});
111
112
}
112
113
Original file line number Diff line number Diff line change @@ -99,7 +99,8 @@ void autoConfigurationShouldMatchDefaultJwsAlgorithm() {
99
99
JwtDecoder jwtDecoder = context .getBean (JwtDecoder .class );
100
100
Object processor = ReflectionTestUtils .getField (jwtDecoder , "jwtProcessor" );
101
101
Object keySelector = ReflectionTestUtils .getField (processor , "jwsKeySelector" );
102
- assertThat (keySelector ).hasFieldOrPropertyWithValue ("jwsAlg" , JWSAlgorithm .RS256 );
102
+ assertThat (keySelector ).hasFieldOrPropertyWithValue ("jwsAlgs" ,
103
+ Collections .singleton (JWSAlgorithm .RS256 ));
103
104
});
104
105
}
105
106
@@ -112,7 +113,8 @@ void autoConfigurationShouldConfigureResourceServerWithJwsAlgorithm() {
112
113
JwtDecoder jwtDecoder = context .getBean (JwtDecoder .class );
113
114
Object processor = ReflectionTestUtils .getField (jwtDecoder , "jwtProcessor" );
114
115
Object keySelector = ReflectionTestUtils .getField (processor , "jwsKeySelector" );
115
- assertThat (keySelector ).hasFieldOrPropertyWithValue ("jwsAlg" , JWSAlgorithm .RS384 );
116
+ assertThat (keySelector ).hasFieldOrPropertyWithValue ("jwsAlgs" ,
117
+ Collections .singleton (JWSAlgorithm .RS384 ));
116
118
assertThat (getBearerTokenFilter (context )).isNotNull ();
117
119
});
118
120
}
Original file line number Diff line number Diff line change @@ -1712,7 +1712,7 @@ bom {
1712
1712
]
1713
1713
}
1714
1714
}
1715
- library(" Spring Security" , " 5.3.2.RELEASE " ) {
1715
+ library(" Spring Security" , " 5.4.0-SNAPSHOT " ) {
1716
1716
group(" org.springframework.security" ) {
1717
1717
imports = [
1718
1718
" spring-security-bom"
You can’t perform that action at this time.
0 commit comments