Table of Contents

Class TenantAuthenticateCommandBehavior<TKey, TEntityModel, TResponse>

Namespace
Arbiter.CommandQuery.Behaviors
Assembly
Arbiter.CommandQuery.dll

A behavior for authenticating a model against the tenant.

public class TenantAuthenticateCommandBehavior<TKey, TEntityModel, TResponse> : PipelineBehaviorBase<EntityModelCommand<TEntityModel, TResponse>, TResponse>, IPipelineBehavior<EntityModelCommand<TEntityModel, TResponse>, TResponse> where TEntityModel : class

Type Parameters

TKey

The type of the model key

TEntityModel

The type of the model

TResponse

The type of the response

Inheritance
PipelineBehaviorBase<EntityModelCommand<TEntityModel, TResponse>, TResponse>
TenantAuthenticateCommandBehavior<TKey, TEntityModel, TResponse>
Implements
IPipelineBehavior<EntityModelCommand<TEntityModel, TResponse>, TResponse>
Inherited Members

Constructors

TenantAuthenticateCommandBehavior(ILoggerFactory, ITenantResolver<TKey>)

public TenantAuthenticateCommandBehavior(ILoggerFactory loggerFactory, ITenantResolver<TKey> tenantResolver)

Parameters

loggerFactory ILoggerFactory

The logger factory to create an ILogger from

tenantResolver ITenantResolver<TKey>

The tenant resolver service.

Exceptions

ArgumentNullException

When tenantResolver is null

Methods

Process(EntityModelCommand<TEntityModel, TResponse>, RequestHandlerDelegate<TResponse>, CancellationToken)

Processes the specified request with the additional behavior.

protected override ValueTask<TResponse?> Process(EntityModelCommand<TEntityModel, TResponse> request, RequestHandlerDelegate<TResponse> next, CancellationToken cancellationToken)

Parameters

request EntityModelCommand<TEntityModel, TResponse>

The incoming request.

next RequestHandlerDelegate<TResponse>

Awaitable delegate for the next action in the pipeline. Eventually this delegate represents the handler.

cancellationToken CancellationToken

The cancellation token.

Returns

ValueTask<TResponse>

Awaitable task returning the TResponse