Class AuthenticationManager

java.lang.Object
com.trilead.ssh2.auth.AuthenticationManager
All Implemented Interfaces:
MessageHandler

public class AuthenticationManager extends Object implements MessageHandler
AuthenticationManager.
Version:
$Id: AuthenticationManager.java,v 1.1 2007/10/15 12:49:57 cplattne Exp $
Author:
Christian Plattner, plattner@trilead.com
  • Field Details

    • PROPERTY_TIMEOUT

      public static final String PROPERTY_TIMEOUT
    • TIMEOUT

      public static final long TIMEOUT
  • Constructor Details

  • Method Details

    • getBanners

      public List<String> getBanners()
      This method contains the SSH_MSG_USERAUTH_BANNER messages sent by the server. Messages can be sent at any time before SSH protocol starts and the authentication is complete. The purpose of the message is to display info to the user before authentication starts. Note: If there are messages sent make sure authentication is complete before using this method.
    • getRemainingMethods

      public String[] getRemainingMethods(String user) throws IOException
      Throws:
      IOException
    • getPartialSuccess

      public boolean getPartialSuccess()
    • authenticateGssapiWithMic

      public boolean authenticateGssapiWithMic(String user, String host) throws IOException
      Throws:
      IOException
    • authenticatePublicKey

      public boolean authenticatePublicKey(String user, AgentProxy proxy) throws IOException
      Throws:
      IOException
    • authenticatePublicKey

      public boolean authenticatePublicKey(String user, char[] PEMPrivateKey, String password, SecureRandom rnd) throws IOException
      Throws:
      IOException
    • authenticateNone

      public boolean authenticateNone(String user) throws IOException
      Throws:
      IOException
    • authenticatePassword

      public boolean authenticatePassword(String user, String pass) throws IOException
      Throws:
      IOException
    • authenticateInteractive

      public boolean authenticateInteractive(String user, String[] submethods, InteractiveCallback cb) throws IOException
      Throws:
      IOException
    • handleMessage

      public void handleMessage(byte[] msg, int msglen) throws IOException
      Description copied from interface: MessageHandler
      Handle message.
      Specified by:
      handleMessage in interface MessageHandler
      Parameters:
      msg - the msg
      msglen - the msglen
      Throws:
      IOException - the io exception
    • handleEndMessage

      public void handleEndMessage(Throwable cause) throws IOException
      Description copied from interface: MessageHandler
      Called to inform that no more messages will be delivered.
      Specified by:
      handleEndMessage in interface MessageHandler
      Parameters:
      cause - For diagnosis, the reason that caused the transport to close down.
      Throws:
      IOException - the io exception