Class MessageAuthorizationDispatchInterceptor<T extends Message>
java.lang.Object
org.axonframework.extension.spring.authorization.MessageAuthorizationDispatchInterceptor<T>
- Type Parameters:
T- The message type this interceptor can process
- All Implemented Interfaces:
MessageDispatchInterceptor<T>
public class MessageAuthorizationDispatchInterceptor<T extends Message>
extends Object
implements MessageDispatchInterceptor<T>
A
MessageDispatchInterceptor that adds the {$code username} and {$code authorities} from the authorized
principle.- Since:
- 4.11.0
- Author:
- Roald Bankras
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioninterceptOnDispatch(T message, ProcessingContext context, MessageDispatchInterceptorChain<T> interceptorChain) Intercepts a givenmessageon dispatching.
-
Constructor Details
-
MessageAuthorizationDispatchInterceptor
-
-
Method Details
-
interceptOnDispatch
@Nonnull public MessageStream<?> interceptOnDispatch(@Nonnull T message, @Nullable ProcessingContext context, @Nonnull MessageDispatchInterceptorChain<T> interceptorChain) Description copied from interface:MessageDispatchInterceptorIntercepts a givenmessageon dispatching. The implementer of this method might want to intercept the message before passing it to the chain (effectively before callingMessageDispatchInterceptorChain.proceed(Message, ProcessingContext)) or after the chain (by mapping the resulting message by callingMessageStream.mapMessage(Function)).- Specified by:
interceptOnDispatchin interfaceMessageDispatchInterceptor<T extends Message>- Parameters:
message- The message to intercept on dispatching.context- The active processing context, if any. Can be used to (e.g.) validate correlation data.interceptorChain- The interceptor chain to signal that processing is finished and further interceptors should be called.- Returns:
- The resulting message stream from
MessageDispatchInterceptorChain.proceed(Message, ProcessingContext).
-