Class AMNetDelegateKeyboardInteractiveAuthenticator
Keyboard-interactive authenticator backed by .NET callbacks for challenge generation and response validation.
Implements
Inherited Members
Namespace: ApacheMinaSSHD.NET.Wrapper.Abstractions
Assembly: ApacheMinaSSHD.NET.Wrapper.dll
Syntax
public sealed class AMNetDelegateKeyboardInteractiveAuthenticator : IAMNetKeyboardInteractiveAuthenticator
Constructors
| Edit this page View SourceAMNetDelegateKeyboardInteractiveAuthenticator(Action<string, ISshChallenge>, Func<ISshSession, string, IResponseList, bool>)
Creates a keyboard-interactive authenticator backed by .NET callbacks.
Declaration
public AMNetDelegateKeyboardInteractiveAuthenticator(Action<string, ISshChallenge> generateChallenge, Func<ISshSession, string, IResponseList, bool> authenticate)
Parameters
| Type | Name | Description |
|---|---|---|
| Action<string, ISshChallenge> | generateChallenge | Callback that populates prompts sent to the client. |
| Func<ISshSession, string, IResponseList, bool> | authenticate | Callback that validates the client responses. |
Methods
| Edit this page View SourceAuthenticate(ISshSession, string, IResponseList)
Validates the client's responses to the generated challenge.
Declaration
public bool Authenticate(ISshSession session, string username, IResponseList response)
Parameters
| Type | Name | Description |
|---|---|---|
| ISshSession | session | Session metadata for the connection being authenticated. |
| string | username | The username requested by the client. |
| IResponseList | response | The responses supplied by the client. |
Returns
| Type | Description |
|---|---|
| bool |
|
GenerateChallenge(string, ISshChallenge)
Populates the challenge sent to the client.
Declaration
public void GenerateChallenge(string username, ISshChallenge challenge)
Parameters
| Type | Name | Description |
|---|---|---|
| string | username | The username requested by the client. |
| ISshChallenge | challenge | The challenge object to populate with prompts. |