File tree Expand file tree Collapse file tree 3 files changed +5
-8
lines changed
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/resource Expand file tree Collapse file tree 3 files changed +5
-8
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 ;
51
50
import org .springframework .security .oauth2 .jwt .Jwt ;
52
51
import org .springframework .security .oauth2 .jwt .JwtIssuerValidator ;
53
52
import org .springframework .security .oauth2 .jwt .NimbusReactiveJwtDecoder ;
@@ -106,8 +105,8 @@ void autoConfigurationUsingJwkSetUriShouldConfigureResourceServerUsingJwsAlgorit
106
105
"spring.security.oauth2.resourceserver.jwt.jws-algorithm=RS512" )
107
106
.run ((context ) -> {
108
107
NimbusReactiveJwtDecoder nimbusReactiveJwtDecoder = context .getBean (NimbusReactiveJwtDecoder .class );
109
- assertThat (nimbusReactiveJwtDecoder ).extracting ("jwtProcessor.arg$1.signatureAlgorithms" ). matches (
110
- ( algorithms ) -> ((Set <SignatureAlgorithm >) algorithms ).contains (SignatureAlgorithm .RS512 ));
108
+ assertThat (nimbusReactiveJwtDecoder ).extracting ("jwtProcessor.arg$2" )
109
+ . matches (( algorithms ) -> ((Set <JWSAlgorithm >) algorithms ).contains (JWSAlgorithm .RS512 ));
111
110
});
112
111
}
113
112
Original file line number Diff line number Diff line change @@ -99,8 +99,7 @@ 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 ("jwsAlgs" ,
103
- Collections .singleton (JWSAlgorithm .RS256 ));
102
+ assertThat (keySelector ).hasFieldOrPropertyWithValue ("jwsAlg" , JWSAlgorithm .RS256 );
104
103
});
105
104
}
106
105
@@ -113,8 +112,7 @@ void autoConfigurationShouldConfigureResourceServerWithJwsAlgorithm() {
113
112
JwtDecoder jwtDecoder = context .getBean (JwtDecoder .class );
114
113
Object processor = ReflectionTestUtils .getField (jwtDecoder , "jwtProcessor" );
115
114
Object keySelector = ReflectionTestUtils .getField (processor , "jwsKeySelector" );
116
- assertThat (keySelector ).hasFieldOrPropertyWithValue ("jwsAlgs" ,
117
- Collections .singleton (JWSAlgorithm .RS384 ));
115
+ assertThat (keySelector ).hasFieldOrPropertyWithValue ("jwsAlg" , JWSAlgorithm .RS384 );
118
116
assertThat (getBearerTokenFilter (context )).isNotNull ();
119
117
});
120
118
}
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.4.0-SNAPSHOT " ) {
1715
+ library(" Spring Security" , " 5.4.0-M1 " ) {
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