mirror of
https://github.com/sshnet/SSH.NET.git
synced 2026-09-10 17:25:51 +00:00
Added partialSuccessLimit argument to ClientAuthentication ctor.
This commit is contained in:
@@ -6,6 +6,34 @@ namespace Renci.SshNet
|
||||
{
|
||||
internal class ClientAuthentication : IClientAuthentication
|
||||
{
|
||||
private readonly int _partialSuccessLimit;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new <see cref="ClientAuthentication"/> instance.
|
||||
/// </summary>
|
||||
/// <param name="partialSuccessLimit">The number of times an authentication attempt with any given <see cref="IAuthenticationMethod"/> can result in <see cref="AuthenticationResult.PartialSuccess"/> before it is disregarded.</param>
|
||||
/// <exception cref="ArgumentOutOfRangeException"><paramref name="partialSuccessLimit"/> is less than one.</exception>
|
||||
public ClientAuthentication(int partialSuccessLimit)
|
||||
{
|
||||
if (partialSuccessLimit < 1)
|
||||
throw new ArgumentOutOfRangeException("partialSuccessLimit", "Cannot be less than one.");
|
||||
|
||||
_partialSuccessLimit = partialSuccessLimit;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the number of times an authentication attempt with any given <see cref="IAuthenticationMethod"/> can
|
||||
/// result in <see cref="AuthenticationResult.PartialSuccess"/> before it is disregarded.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The number of times an authentication attempt with any given <see cref="IAuthenticationMethod"/> can result
|
||||
/// in <see cref="AuthenticationResult.PartialSuccess"/> before it is disregarded.
|
||||
/// </value>
|
||||
internal int PartialSuccessLimit
|
||||
{
|
||||
get { return _partialSuccessLimit; }
|
||||
}
|
||||
|
||||
public void Authenticate(IConnectionInfoInternal connectionInfo, ISession session)
|
||||
{
|
||||
if (connectionInfo == null)
|
||||
|
||||
Reference in New Issue
Block a user