mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-10-23 10:48:51 +00:00
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
This commit is contained in:
parent
559b73b39f
commit
4cbe8de7ea
@ -121,7 +121,7 @@ public class AnonymousAuthenticationITests {
|
|||||||
ReactiveAuthorizationManager<PayloadExchangeAuthorizationContext> anonymous = (authentication,
|
ReactiveAuthorizationManager<PayloadExchangeAuthorizationContext> anonymous = (authentication,
|
||||||
exchange) -> authentication.map(trustResolver::isAnonymous).map(AuthorizationDecision::new);
|
exchange) -> authentication.map(trustResolver::isAnonymous).map(AuthorizationDecision::new);
|
||||||
rsocket.authorizePayload((authorize) -> authorize.anyExchange().access(anonymous));
|
rsocket.authorizePayload((authorize) -> authorize.anyExchange().access(anonymous));
|
||||||
rsocket.anonymousAuthentication((anonymousAuthentication) -> anonymousAuthentication.disable());
|
rsocket.anonymous((anonymousAuthentication) -> anonymousAuthentication.disable());
|
||||||
return rsocket.build();
|
return rsocket.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -171,8 +171,9 @@ public class RSocketSecurity {
|
|||||||
* Adds anonymous authentication
|
* Adds anonymous authentication
|
||||||
* @param anonymous a customizer
|
* @param anonymous a customizer
|
||||||
* @return this instance
|
* @return this instance
|
||||||
|
* @since 7.0
|
||||||
*/
|
*/
|
||||||
public RSocketSecurity anonymousAuthentication(Customizer<AnonymousAuthenticationSpec> anonymous) {
|
public RSocketSecurity anonymous(Customizer<AnonymousAuthenticationSpec> anonymous) {
|
||||||
if (this.anonymousAuthSpec == null) {
|
if (this.anonymousAuthSpec == null) {
|
||||||
this.anonymousAuthSpec = new AnonymousAuthenticationSpec(this);
|
this.anonymousAuthSpec = new AnonymousAuthenticationSpec(this);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user