Interface IAuthenticationHandler
Represents authentication handler for command-line AMI.
Namespace: DotNext.Maintenance.CommandLine.Authentication
Assembly: DotNext.MaintenanceServices.dll
Syntax
public interface IAuthenticationHandler
Methods
| Edit this page View SourceChallengeAsync(InvocationContext, IIdentity, CancellationToken)
Challenges the maintenance session.
Declaration
ValueTask<IPrincipal?> ChallengeAsync(InvocationContext context, IIdentity identity, CancellationToken token)
Parameters
Type | Name | Description |
---|---|---|
InvocationContext | context | The command invocation context. |
IIdentity | identity | The identity of the user to authenticate. |
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. |
GetGlobalOptions()
Gets global options that can be used to authenticate the command.
Declaration
IEnumerable<Option> GetGlobalOptions()
Returns
Type | Description |
---|---|
IEnumerable<Option> | A collection of global options. |