Class AuthenticationPayloadInterceptor
java.lang.Object
org.springframework.security.rsocket.authentication.AuthenticationPayloadInterceptor
- All Implemented Interfaces:
org.springframework.core.Ordered
,PayloadInterceptor
public class AuthenticationPayloadInterceptor
extends Object
implements PayloadInterceptor, org.springframework.core.Ordered
Uses the provided
ReactiveAuthenticationManager
to authenticate a Payload. If
authentication is successful, then the result is added to
ReactiveSecurityContextHolder
.- Since:
- 5.2
-
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
ConstructorDescriptionAuthenticationPayloadInterceptor
(ReactiveAuthenticationManager authenticationManager) Creates a new instance -
Method Summary
Modifier and TypeMethodDescriptionint
getOrder()
reactor.core.publisher.Mono<Void>
intercept
(PayloadExchange exchange, PayloadInterceptorChain chain) Process the Web request and (optionally) delegate to the nextPayloadInterceptor
through the givenPayloadInterceptorChain
.void
setAuthenticationConverter
(PayloadExchangeAuthenticationConverter authenticationConverter) Sets the convert to be usedvoid
setOrder
(int order)
-
Constructor Details
-
AuthenticationPayloadInterceptor
Creates a new instance- Parameters:
authenticationManager
- the manager to use. Cannot be null
-
-
Method Details
-
getOrder
public int getOrder()- Specified by:
getOrder
in interfaceorg.springframework.core.Ordered
-
setOrder
public void setOrder(int order) -
setAuthenticationConverter
public void setAuthenticationConverter(PayloadExchangeAuthenticationConverter authenticationConverter) Sets the convert to be used- Parameters:
authenticationConverter
-
-
intercept
public reactor.core.publisher.Mono<Void> intercept(PayloadExchange exchange, PayloadInterceptorChain chain) Description copied from interface:PayloadInterceptor
Process the Web request and (optionally) delegate to the nextPayloadInterceptor
through the givenPayloadInterceptorChain
.- Specified by:
intercept
in interfacePayloadInterceptor
- Parameters:
exchange
- the current payload exchangechain
- provides a way to delegate to the next interceptor- Returns:
Mono<Void>
to indicate when payload processing is complete
-