Class PasswordAuthenticationMethod
Provides functionality to perform password authentication.
public class PasswordAuthenticationMethod : AuthenticationMethod, IDisposable
- Inheritance
-
PasswordAuthenticationMethod
- Implements
- Inherited Members
Constructors
PasswordAuthenticationMethod(string, byte[])
Initializes a new instance of the PasswordAuthenticationMethod class.
public PasswordAuthenticationMethod(string username, byte[] password)
Parameters
Exceptions
- ArgumentException
username
is whitespace or null.- ArgumentException
password
is null.
PasswordAuthenticationMethod(string, string)
Initializes a new instance of the PasswordAuthenticationMethod class.
public PasswordAuthenticationMethod(string username, string password)
Parameters
Exceptions
- ArgumentException
username
is whitespace or null.- ArgumentException
password
is null.
Properties
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.
Exceptions
- ArgumentNullException
session
is null.
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.
~PasswordAuthenticationMethod()
Finalizes an instance of the PasswordAuthenticationMethod class.
protected ~PasswordAuthenticationMethod()
Events
PasswordExpired
Occurs when user's password has expired and needs to be changed.
public event EventHandler<AuthenticationPasswordChangeEventArgs> PasswordExpired