Class AuthenticationMethod
- Namespace
- Renci.SshNet
- Assembly
- Renci.SshNet.dll
Base class for all supported authentication methods.
public abstract class AuthenticationMethod : IDisposableInheritance
Derived
Implements
Inherited Members
Constructors
AuthenticationMethod(string)
Initializes a new instance of the Renci.SshNet.AuthenticationMethod class.
protected AuthenticationMethod(string username)Parameters
usernamestring-
The username.
Exceptions
- ArgumentException
-
usernameis whitespace or null.
Properties
AllowedAuthentications
Gets or sets the list of allowed authentications.
public string[] AllowedAuthentications { get; protected set; }Property Value
- string[]
Name
Gets the name of the authentication method.
public abstract string Name { get; }Property Value
Username
Gets connection username.
public string Username { get; }Property Value
Methods
Authenticate(Session)
Authenticates the specified session.
public abstract AuthenticationResult Authenticate(Session session)Parameters
sessionSession-
The session to authenticate.
Returns
- AuthenticationResult
-
The result of the authentication process.
Dispose(bool)
Releases unmanaged and - optionally - managed resources.
protected virtual void Dispose(bool disposing)Parameters
disposingbool-
true to release both managed and unmanaged resources; false to release only unmanaged resources.
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()