Class TestAuthenticationHandler

Namespace
XBullet.EasyTesting.Authentication
Assembly
XBullet.EasyTesting.dll

Authenticates requests carrying a test-user header. Requests without the header remain anonymous. This handler must only be enabled in a test host.

public sealed class TestAuthenticationHandler : AuthenticationHandler<TestAuthenticationOptions>, IAuthenticationHandler
Inheritance
TestAuthenticationHandler
Implements
Inherited Members

Constructors

TestAuthenticationHandler(IOptionsMonitor<TestAuthenticationOptions>, ILoggerFactory, UrlEncoder)

Initializes the test authentication handler.

public TestAuthenticationHandler(IOptionsMonitor<TestAuthenticationOptions> options, ILoggerFactory logger, UrlEncoder encoder)

Parameters

options IOptionsMonitor<TestAuthenticationOptions>

The framework-owned monitor that supplies options for each registered test authentication scheme. The handler retains the monitor and does not dispose it.

logger ILoggerFactory

The framework-owned factory used to create handler loggers. The handler retains the factory and does not dispose it.

encoder UrlEncoder

The framework-owned URL encoder used by the authentication-handler base class. The handler retains the encoder and does not dispose it.

Methods

HandleAuthenticateAsync()

Allows derived types to handle authentication.

protected override Task<AuthenticateResult> HandleAuthenticateAsync()

Returns

Task<AuthenticateResult>

The AuthenticateResult.