Search Results for

    Class AMNetFixedKeyboardInteractiveAuthenticator

    Keyboard-interactive authenticator for a single fixed response.

    Inheritance
    object
    AMNetFixedKeyboardInteractiveAuthenticator
    Implements
    IAMNetKeyboardInteractiveAuthenticator
    IDisposable
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: ApacheMinaSSHD.NET.Wrapper.Abstractions
    Assembly: ApacheMinaSSHD.NET.Wrapper.dll
    Syntax
    public sealed class AMNetFixedKeyboardInteractiveAuthenticator : IAMNetKeyboardInteractiveAuthenticator, IDisposable
    Remarks

    This class is intended for samples, tests, or simple controlled deployments. Production applications should normally validate one-time codes or secondary factors through their own identity provider.

    Constructors

    | Edit this page View Source

    AMNetFixedKeyboardInteractiveAuthenticator(string, string?, string, string, string)

    Creates a fixed keyboard-interactive authenticator.

    Declaration
    public AMNetFixedKeyboardInteractiveAuthenticator(string expectedResponse, string? username = null, string prompt = "Verification code", string interactionName = "Authentication", string instruction = "Enter the verification code.")
    Parameters
    Type Name Description
    string expectedResponse

    The exact response to accept.

    string username

    Optional exact username to accept. When null, any username can answer the challenge.

    string prompt

    Prompt text shown to the client.

    string interactionName

    Challenge name shown to the client.

    string instruction

    Instruction text shown with the challenge.

    Properties

    | Edit this page View Source

    Instruction

    Gets the instruction text shown with the challenge.

    Declaration
    public string Instruction { get; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    InteractionName

    Gets the challenge name shown to the client.

    Declaration
    public string InteractionName { get; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    Prompt

    Gets the prompt text shown to the client.

    Declaration
    public string Prompt { get; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    Username

    Gets the optional exact username accepted by this authenticator.

    Declaration
    public string? Username { get; }
    Property Value
    Type Description
    string

    Methods

    | Edit this page View Source

    Authenticate(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

    true to accept the responses; otherwise false.

    | Edit this page View Source

    Dispose()

    Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

    Declaration
    public void Dispose()
    | Edit this page View Source

    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.

    Implements

    IAMNetKeyboardInteractiveAuthenticator
    IDisposable
    • Edit this page
    • View Source
    In this article
    Back to top Porta SFTP ServerGitHubApacheMinaSSHD.NET Generated by DocFX