Class PasswordAuthenticationHandler
Provides simple authentication model based on login/password.
Implements
Inherited Members
Namespace: DotNext.Maintenance.CommandLine.Authentication
Assembly: DotNext.MaintenanceServices.dll
Syntax
public abstract class PasswordAuthenticationHandler : IAuthenticationHandler
Constructors
| Edit this page View SourcePasswordAuthenticationHandler()
Initializes a new handler.
Declaration
protected PasswordAuthenticationHandler()
Methods
| Edit this page View SourceChallengeAsync(string, string, CancellationToken)
Performs authentication using provided login and password.
Declaration
protected abstract ValueTask<IPrincipal?> ChallengeAsync(string login, string secret, CancellationToken token)
Parameters
Type | Name | Description |
---|---|---|
string | login | The name of the user. |
string | secret | The password. |
CancellationToken | token | The token that can be used to cancel the operation. |
Returns
Type | Description |
---|---|
ValueTask<IPrincipal> | Authentication result; or null in case of failed authentication. |