Skip to content

Commit 7c1a8c1

Browse files
committed
Drop back to Spring Security 5.4.0-M1
See gh-21932
1 parent 742ac87 commit 7c1a8c1

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/resource/reactive/ReactiveOAuth2ResourceServerAutoConfigurationTests.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
import org.springframework.security.core.userdetails.MapReactiveUserDetailsService;
4848
import org.springframework.security.oauth2.core.DelegatingOAuth2TokenValidator;
4949
import org.springframework.security.oauth2.core.OAuth2TokenValidator;
50-
import org.springframework.security.oauth2.jose.jws.SignatureAlgorithm;
5150
import org.springframework.security.oauth2.jwt.Jwt;
5251
import org.springframework.security.oauth2.jwt.JwtIssuerValidator;
5352
import 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

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/resource/servlet/OAuth2ResourceServerAutoConfigurationTests.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff 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
}

spring-boot-project/spring-boot-dependencies/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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"

0 commit comments

Comments
 (0)