Class PrivateKeyAuthenticationMethod
Provides functionality to perform private key authentication.
public class PrivateKeyAuthenticationMethod : AuthenticationMethod, IDisposable
- Inheritance
-
PrivateKeyAuthenticationMethod
- Implements
- Inherited Members
Constructors
PrivateKeyAuthenticationMethod(string, params IPrivateKeySource[])
Initializes a new instance of the PrivateKeyAuthenticationMethod class.
public PrivateKeyAuthenticationMethod(string username, params IPrivateKeySource[] keyFiles)
Parameters
username
stringThe username.
keyFiles
IPrivateKeySource[]The key files.
Exceptions
- ArgumentException
username
is whitespace or null.
Properties
KeyFiles
Gets the key files used for authentication.
public ICollection<IPrivateKeySource> KeyFiles { get; }
Property Value
Name
Gets the name of the authentication method.
public override string Name { get; }
Property Value
Methods
Authenticate(Session)
Authenticates the specified session.
public override AuthenticationResult Authenticate(Session session)
Parameters
session
SessionThe session to authenticate.
Returns
- AuthenticationResult
Result of authentication process.
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Dispose(bool)
Releases unmanaged and - optionally - managed resources.
protected virtual void Dispose(bool disposing)
Parameters
disposing
booltrue to release both managed and unmanaged resources; false to release only unmanaged resources.
~PrivateKeyAuthenticationMethod()
Finalizes an instance of the PrivateKeyAuthenticationMethod class.
protected ~PrivateKeyAuthenticationMethod()