AuthenticationMethod
Base class for all supported authentication methods.
using System;
namespace Renci.SshNet
{
public abstract class AuthenticationMethod : IAuthenticationMethod
{
public abstract string Name { get; }
public string Username { get; set; }
public string[] AllowedAuthentications { get; set; }
protected AuthenticationMethod(string username)
{
if (string.IsNullOrWhiteSpace(username))
throw new ArgumentException("username");
Username = username;
}
public abstract AuthenticationResult Authenticate(Session session);
AuthenticationResult IAuthenticationMethod.Authenticate(ISession session)
{
return Authenticate((Session)session);
}
}
}