Class AuthenticationPayloadInterceptor
- java.lang.Object
-
- org.springframework.security.rsocket.authentication.AuthenticationPayloadInterceptor
-
- All Implemented Interfaces:
org.springframework.core.Ordered,PayloadInterceptor
public class AuthenticationPayloadInterceptor extends java.lang.Object implements PayloadInterceptor, org.springframework.core.Ordered
Uses the providedReactiveAuthenticationManagerto authenticate a Payload. If authentication is successful, then the result is added toReactiveSecurityContextHolder.- Since:
- 5.2
-
-
Constructor Summary
Constructors Constructor Description AuthenticationPayloadInterceptor(ReactiveAuthenticationManager authenticationManager)Creates a new instance
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetOrder()reactor.core.publisher.Mono<java.lang.Void>intercept(PayloadExchange exchange, PayloadInterceptorChain chain)Process the Web request and (optionally) delegate to the nextPayloadInterceptorthrough the givenPayloadInterceptorChain.voidsetAuthenticationConverter(PayloadExchangeAuthenticationConverter authenticationConverter)Sets the convert to be usedvoidsetOrder(int order)
-
-
-
Constructor Detail
-
AuthenticationPayloadInterceptor
public AuthenticationPayloadInterceptor(ReactiveAuthenticationManager authenticationManager)
Creates a new instance- Parameters:
authenticationManager- the manager to use. Cannot be null
-
-
Method Detail
-
getOrder
public int getOrder()
- Specified by:
getOrderin 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<java.lang.Void> intercept(PayloadExchange exchange, PayloadInterceptorChain chain)
Description copied from interface:PayloadInterceptorProcess the Web request and (optionally) delegate to the nextPayloadInterceptorthrough the givenPayloadInterceptorChain.- Specified by:
interceptin 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
-
-