Class AnonymousPayloadInterceptor
java.lang.Object
org.springframework.security.rsocket.authentication.AnonymousPayloadInterceptor
- All Implemented Interfaces:
- org.springframework.core.Ordered,- PayloadInterceptor
public class AnonymousPayloadInterceptor
extends Object
implements PayloadInterceptor, org.springframework.core.Ordered
If 
ReactiveSecurityContextHolder is empty populates an
 AnonymousAuthenticationToken- Since:
- 5.2
- 
Field SummaryFields inherited from interface org.springframework.core.OrderedHIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
- 
Constructor SummaryConstructorsConstructorDescriptionCreates a filter with a principal named "anonymousUser" and the single authority "ROLE_ANONYMOUS".AnonymousPayloadInterceptor(String key, Object principal, List<GrantedAuthority> authorities) 
- 
Method SummaryModifier and TypeMethodDescriptionintgetOrder()reactor.core.publisher.Mono<Void>intercept(PayloadExchange exchange, PayloadInterceptorChain chain) Process the Web request and (optionally) delegate to the nextPayloadInterceptorthrough the givenPayloadInterceptorChain.voidsetOrder(int order) 
- 
Constructor Details- 
AnonymousPayloadInterceptorCreates a filter with a principal named "anonymousUser" and the single authority "ROLE_ANONYMOUS".- Parameters:
- key- the key to identify tokens created by this filter
 
- 
AnonymousPayloadInterceptorpublic AnonymousPayloadInterceptor(String key, Object principal, List<GrantedAuthority> authorities) - Parameters:
- key- key the key to identify tokens created by this filter
- principal- the principal which will be used to represent anonymous users
- authorities- the authority list for anonymous users
 
 
- 
- 
Method Details- 
getOrderpublic int getOrder()- Specified by:
- getOrderin interface- org.springframework.core.Ordered
 
- 
setOrderpublic void setOrder(int order) 
- 
interceptpublic reactor.core.publisher.Mono<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 interface- PayloadInterceptor
- Parameters:
- exchange- the current payload exchange
- chain- provides a way to delegate to the next interceptor
- Returns:
- Mono<Void>to indicate when payload processing is complete
 
 
-