mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-06-25 21:42:17 +00:00
RSocketSecurity delegates to correct matcher
Fixes gh-7414
This commit is contained in:
parent
1b699a49fb
commit
6296e6e896
@ -263,7 +263,20 @@ public class RSocketSecurity {
|
||||
return matcher(PayloadExchangeMatchers.setup());
|
||||
}
|
||||
|
||||
/**
|
||||
* Matches if {@link org.springframework.security.rsocket.api.PayloadExchangeType#isRequest()} is true, else
|
||||
* not a match
|
||||
* @return the Access to set up the authorization rule.
|
||||
*/
|
||||
public Access anyRequest() {
|
||||
return matcher(PayloadExchangeMatchers.anyRequest());
|
||||
}
|
||||
|
||||
/**
|
||||
* Always matches
|
||||
* @return the Access to set up the authorization rule.
|
||||
*/
|
||||
public Access anyExchange() {
|
||||
return matcher(PayloadExchangeMatchers.anyExchange());
|
||||
}
|
||||
|
||||
|
@ -157,7 +157,7 @@ public class JwtITests {
|
||||
.authorizePayload(authorize ->
|
||||
authorize
|
||||
.route("secure.admin.*").authenticated()
|
||||
.anyRequest().permitAll()
|
||||
.anyExchange().permitAll()
|
||||
)
|
||||
.jwt(Customizer.withDefaults());
|
||||
return rsocket.build();
|
||||
|
@ -261,7 +261,7 @@ public class RSocketMessageHandlerITests {
|
||||
.authorizePayload(authorize -> {
|
||||
authorize
|
||||
.route("secure.*").authenticated()
|
||||
.anyRequest().permitAll();
|
||||
.anyExchange().permitAll();
|
||||
})
|
||||
.basicAuthentication(Customizer.withDefaults());
|
||||
return rsocket.build();
|
||||
|
Loading…
x
Reference in New Issue
Block a user