Class AMNetFingerprintPublickeyAuthenticator
Public key authenticator backed by application-managed SSH key fingerprints.
Implements
Inherited Members
Namespace: ApacheMinaSSHD.NET.Wrapper.Abstractions
Assembly: ApacheMinaSSHD.NET.Wrapper.dll
Syntax
public sealed class AMNetFingerprintPublickeyAuthenticator : IAMNetPublickeyAuthenticator
Remarks
Fingerprints should use the same format returned by Apache MINA SSHD, for
example SHA256:.... Use this when the application stores fingerprints
in a database or configuration store instead of an authorized_keys file.
Constructors
| Edit this page View SourceAMNetFingerprintPublickeyAuthenticator()
Creates an empty fingerprint authenticator.
Declaration
public AMNetFingerprintPublickeyAuthenticator()
AMNetFingerprintPublickeyAuthenticator(string, string)
Creates a fingerprint authenticator for one username and fingerprint.
Declaration
public AMNetFingerprintPublickeyAuthenticator(string username, string fingerprint)
Parameters
| Type | Name | Description |
|---|---|---|
| string | username | The exact username to accept. |
| string | fingerprint | The public key fingerprint to accept for the user. |
Methods
| Edit this page View SourceAddFingerprint(string, string)
Adds an accepted fingerprint for a username.
Declaration
public AMNetFingerprintPublickeyAuthenticator AddFingerprint(string username, string fingerprint)
Parameters
| Type | Name | Description |
|---|---|---|
| string | username | The exact username to accept. |
| string | fingerprint | The public key fingerprint to accept for the user. |
Returns
| Type | Description |
|---|---|
| AMNetFingerprintPublickeyAuthenticator | The current authenticator so calls can be chained. |
Authenticate(string, string, ISshSession)
Returns whether the supplied public key fingerprint should be accepted for the user.
Declaration
public bool Authenticate(string username, string incomingFingerprint, ISshSession session)
Parameters
| Type | Name | Description |
|---|---|---|
| string | username | The username requested by the client. |
| string | incomingFingerprint | The fingerprint of the public key presented by the client. |
| ISshSession | session | Session metadata for the connection being authenticated. |
Returns
| Type | Description |
|---|---|
| bool |
|