Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 4cbe8de

Browse files
committed
Polish RSocket Anonymous Support
Changed the DSL method name to anonymous to align with jwt. Since basicAuthenication is deprecated, we don't need to align with its naming convention. Also added a since attribute to the method. Issue gh-17132
1 parent 559b73b commit 4cbe8de

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

‎config/src/integration-test/java/org/springframework/security/config/annotation/rsocket/AnonymousAuthenticationITests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ PayloadSocketAcceptorInterceptor rsocketInterceptor(RSocketSecurity rsocket) {
121121
ReactiveAuthorizationManager<PayloadExchangeAuthorizationContext> anonymous = (authentication,
122122
exchange) -> authentication.map(trustResolver::isAnonymous).map(AuthorizationDecision::new);
123123
rsocket.authorizePayload((authorize) -> authorize.anyExchange().access(anonymous));
124-
rsocket.anonymousAuthentication((anonymousAuthentication) -> anonymousAuthentication.disable());
124+
rsocket.anonymous((anonymousAuthentication) -> anonymousAuthentication.disable());
125125
return rsocket.build();
126126
}
127127

‎config/src/main/java/org/springframework/security/config/annotation/rsocket/RSocketSecurity.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,9 @@ public RSocketSecurity simpleAuthentication(Customizer<SimpleAuthenticationSpec>
171171
* Adds anonymous authentication
172172
* @param anonymous a customizer
173173
* @return this instance
174+
* @since 7.0
174175
*/
175-
public RSocketSecurity anonymousAuthentication(Customizer<AnonymousAuthenticationSpec> anonymous) {
176+
public RSocketSecurity anonymous(Customizer<AnonymousAuthenticationSpec> anonymous) {
176177
if (this.anonymousAuthSpec == null) {
177178
this.anonymousAuthSpec = new AnonymousAuthenticationSpec(this);
178179
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /