mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-06-26 13:53:14 +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());
|
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() {
|
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());
|
return matcher(PayloadExchangeMatchers.anyExchange());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -157,7 +157,7 @@ public class JwtITests {
|
|||||||
.authorizePayload(authorize ->
|
.authorizePayload(authorize ->
|
||||||
authorize
|
authorize
|
||||||
.route("secure.admin.*").authenticated()
|
.route("secure.admin.*").authenticated()
|
||||||
.anyRequest().permitAll()
|
.anyExchange().permitAll()
|
||||||
)
|
)
|
||||||
.jwt(Customizer.withDefaults());
|
.jwt(Customizer.withDefaults());
|
||||||
return rsocket.build();
|
return rsocket.build();
|
||||||
|
@ -261,7 +261,7 @@ public class RSocketMessageHandlerITests {
|
|||||||
.authorizePayload(authorize -> {
|
.authorizePayload(authorize -> {
|
||||||
authorize
|
authorize
|
||||||
.route("secure.*").authenticated()
|
.route("secure.*").authenticated()
|
||||||
.anyRequest().permitAll();
|
.anyExchange().permitAll();
|
||||||
})
|
})
|
||||||
.basicAuthentication(Customizer.withDefaults());
|
.basicAuthentication(Customizer.withDefaults());
|
||||||
return rsocket.build();
|
return rsocket.build();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user