Interface IAuthorizingMediator
- Namespace
- Stratara.Abstractions.Mediator
- Assembly
- Stratara.Abstractions.dll
Marker interface for an IMediator decorator that enforces
[RequireRole] authorization before dispatching to handlers. The startup-time
authorization validator uses this marker to recognise the authorizing dispatch path
at runtime.
public interface IAuthorizingMediator : IMediator
- Inherited Members
- Extension Methods
Remarks
The default authorizing decorator (registered via
services.AddAuthorizingMediator<TAuthorizationProvider>()) implements this
marker. If you wrap that decorator with a custom mediator implementation, your
outermost decorator must also implement IAuthorizingMediator so the
startup validator does not flag the host as missing role enforcement.
Implementing this marker is a contract: the implementer commits to evaluating any
[RequireRole] attributes on the request type before invoking the handler chain.
Implementing the marker without performing that check defeats the validator.