Skip to content

Commit a92d64c

Browse files
committed
Start building against Spring Security 5.4.0-M2 snapshots
See gh-21932
1 parent c54918e commit a92d64c

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
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;
5051
import org.springframework.security.oauth2.jwt.Jwt;
5152
import org.springframework.security.oauth2.jwt.JwtIssuerValidator;
5253
import org.springframework.security.oauth2.jwt.NimbusReactiveJwtDecoder;
@@ -105,8 +106,8 @@ void autoConfigurationUsingJwkSetUriShouldConfigureResourceServerUsingJwsAlgorit
105106
"spring.security.oauth2.resourceserver.jwt.jws-algorithm=RS512")
106107
.run((context) -> {
107108
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));
110111
});
111112
}
112113

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ 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("jwsAlg", JWSAlgorithm.RS256);
102+
assertThat(keySelector).hasFieldOrPropertyWithValue("jwsAlgs",
103+
Collections.singleton(JWSAlgorithm.RS256));
103104
});
104105
}
105106

@@ -112,7 +113,8 @@ void autoConfigurationShouldConfigureResourceServerWithJwsAlgorithm() {
112113
JwtDecoder jwtDecoder = context.getBean(JwtDecoder.class);
113114
Object processor = ReflectionTestUtils.getField(jwtDecoder, "jwtProcessor");
114115
Object keySelector = ReflectionTestUtils.getField(processor, "jwsKeySelector");
115-
assertThat(keySelector).hasFieldOrPropertyWithValue("jwsAlg", JWSAlgorithm.RS384);
116+
assertThat(keySelector).hasFieldOrPropertyWithValue("jwsAlgs",
117+
Collections.singleton(JWSAlgorithm.RS384));
116118
assertThat(getBearerTokenFilter(context)).isNotNull();
117119
});
118120
}

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.3.2.RELEASE") {
1715+
library("Spring Security", "5.4.0-SNAPSHOT") {
17161716
group("org.springframework.security") {
17171717
imports = [
17181718
"spring-security-bom"

0 commit comments

Comments
 (0)