Skip to content

Commit 3beec78

Browse files
committed
Adapt to Spring Security deprecations
1 parent 6957557 commit 3beec78

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/resource/reactive/ReactiveOAuth2ResourceServerOpaqueTokenConfiguration.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2023 the original author or authors.
2+
* Copyright 2012-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -46,8 +46,10 @@ static class OpaqueTokenIntrospectionClientConfiguration {
4646
@ConditionalOnProperty(name = "spring.security.oauth2.resourceserver.opaquetoken.introspection-uri")
4747
SpringReactiveOpaqueTokenIntrospector opaqueTokenIntrospector(OAuth2ResourceServerProperties properties) {
4848
OAuth2ResourceServerProperties.Opaquetoken opaqueToken = properties.getOpaquetoken();
49-
return new SpringReactiveOpaqueTokenIntrospector(opaqueToken.getIntrospectionUri(),
50-
opaqueToken.getClientId(), opaqueToken.getClientSecret());
49+
return SpringReactiveOpaqueTokenIntrospector.withIntrospectionUri(opaqueToken.getIntrospectionUri())
50+
.clientId(opaqueToken.getClientId())
51+
.clientSecret(opaqueToken.getClientSecret())
52+
.build();
5153
}
5254

5355
}

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/resource/servlet/OAuth2ResourceServerOpaqueTokenConfiguration.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2023 the original author or authors.
2+
* Copyright 2012-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -48,8 +48,10 @@ static class OpaqueTokenIntrospectionClientConfiguration {
4848
@ConditionalOnProperty(name = "spring.security.oauth2.resourceserver.opaquetoken.introspection-uri")
4949
SpringOpaqueTokenIntrospector opaqueTokenIntrospector(OAuth2ResourceServerProperties properties) {
5050
OAuth2ResourceServerProperties.Opaquetoken opaqueToken = properties.getOpaquetoken();
51-
return new SpringOpaqueTokenIntrospector(opaqueToken.getIntrospectionUri(), opaqueToken.getClientId(),
52-
opaqueToken.getClientSecret());
51+
return SpringOpaqueTokenIntrospector.withIntrospectionUri(opaqueToken.getIntrospectionUri())
52+
.clientId(opaqueToken.getClientId())
53+
.clientSecret(opaqueToken.getClientSecret())
54+
.build();
5355
}
5456

5557
}

0 commit comments

Comments
 (0)