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 4747import org .springframework .security .core .userdetails .MapReactiveUserDetailsService ;
4848import org .springframework .security .oauth2 .core .DelegatingOAuth2TokenValidator ;
4949import org .springframework .security .oauth2 .core .OAuth2TokenValidator ;
50- import org .springframework .security .oauth2 .jose .jws .SignatureAlgorithm ;
5150import org .springframework .security .oauth2 .jwt .Jwt ;
5251import org .springframework .security .oauth2 .jwt .JwtIssuerValidator ;
5352import org .springframework .security .oauth2 .jwt .NimbusReactiveJwtDecoder ;
@@ -106,8 +105,8 @@ void autoConfigurationUsingJwkSetUriShouldConfigureResourceServerUsingJwsAlgorit
106105 "spring.security.oauth2.resourceserver.jwt.jws-algorithm=RS512" )
107106 .run ((context ) -> {
108107 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 ));
111110 });
112111 }
113112
Original file line number Diff line number Diff line change @@ -99,8 +99,7 @@ void autoConfigurationShouldMatchDefaultJwsAlgorithm() {
9999 JwtDecoder jwtDecoder = context .getBean (JwtDecoder .class );
100100 Object processor = ReflectionTestUtils .getField (jwtDecoder , "jwtProcessor" );
101101 Object keySelector = ReflectionTestUtils .getField (processor , "jwsKeySelector" );
102- assertThat (keySelector ).hasFieldOrPropertyWithValue ("jwsAlgs" ,
103- Collections .singleton (JWSAlgorithm .RS256 ));
102+ assertThat (keySelector ).hasFieldOrPropertyWithValue ("jwsAlg" , JWSAlgorithm .RS256 );
104103 });
105104 }
106105
@@ -113,8 +112,7 @@ void autoConfigurationShouldConfigureResourceServerWithJwsAlgorithm() {
113112 JwtDecoder jwtDecoder = context .getBean (JwtDecoder .class );
114113 Object processor = ReflectionTestUtils .getField (jwtDecoder , "jwtProcessor" );
115114 Object keySelector = ReflectionTestUtils .getField (processor , "jwsKeySelector" );
116- assertThat (keySelector ).hasFieldOrPropertyWithValue ("jwsAlgs" ,
117- Collections .singleton (JWSAlgorithm .RS384 ));
115+ assertThat (keySelector ).hasFieldOrPropertyWithValue ("jwsAlg" , JWSAlgorithm .RS384 );
118116 assertThat (getBearerTokenFilter (context )).isNotNull ();
119117 });
120118 }
Original file line number Diff line number Diff line change @@ -1712,7 +1712,7 @@ bom {
17121712 ]
17131713 }
17141714 }
1715- library(" Spring Security" , " 5.4.0-SNAPSHOT " ) {
1715+ library(" Spring Security" , " 5.4.0-M1 " ) {
17161716 group(" org.springframework.security" ) {
17171717 imports = [
17181718 " spring-security-bom"
You can’t perform that action at this time.
0 commit comments