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
optionsIOptionsMonitor<TestAuthenticationOptions>The framework-owned monitor that supplies options for each registered test authentication scheme. The handler retains the monitor and does not dispose it.
loggerILoggerFactoryThe framework-owned factory used to create handler loggers. The handler retains the factory and does not dispose it.
encoderUrlEncoderThe 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()