Package com.trilead.ssh2.auth
Class AuthenticationManager
java.lang.Object
com.trilead.ssh2.auth.AuthenticationManager
- All Implemented Interfaces:
MessageHandler
AuthenticationManager.
- Version:
- $Id: AuthenticationManager.java,v 1.1 2007/10/15 12:49:57 cplattne Exp $
- Author:
- Christian Plattner, plattner@trilead.com
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanauthenticateGssapiWithMic(String user, String host) booleanauthenticateInteractive(String user, String[] submethods, InteractiveCallback cb) booleanauthenticateNone(String user) booleanauthenticatePassword(String user, String pass) booleanauthenticatePublicKey(String user, char[] PEMPrivateKey, String password, SecureRandom rnd) booleanauthenticatePublicKey(String user, AgentProxy proxy) This method contains the SSH_MSG_USERAUTH_BANNER messages sent by the server.booleanString[]getRemainingMethods(String user) voidhandleEndMessage(Throwable cause) Called to inform that no more messages will be delivered.voidhandleMessage(byte[] msg, int msglen) Handle message.
-
Field Details
-
PROPERTY_TIMEOUT
-
TIMEOUT
public static final long TIMEOUT
-
-
Constructor Details
-
AuthenticationManager
-
-
Method Details
-
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
- Throws:
IOException
-
getPartialSuccess
public boolean getPartialSuccess() -
authenticateGssapiWithMic
- Throws:
IOException
-
authenticatePublicKey
- Throws:
IOException
-
authenticatePublicKey
public boolean authenticatePublicKey(String user, char[] PEMPrivateKey, String password, SecureRandom rnd) throws IOException - Throws:
IOException
-
authenticateNone
- Throws:
IOException
-
authenticatePassword
- Throws:
IOException
-
authenticateInteractive
public boolean authenticateInteractive(String user, String[] submethods, InteractiveCallback cb) throws IOException - Throws:
IOException
-
handleMessage
Description copied from interface:MessageHandlerHandle message.- Specified by:
handleMessagein interfaceMessageHandler- Parameters:
msg- the msgmsglen- the msglen- Throws:
IOException- the io exception
-
handleEndMessage
Description copied from interface:MessageHandlerCalled to inform that no more messages will be delivered.- Specified by:
handleEndMessagein interfaceMessageHandler- Parameters:
cause- For diagnosis, the reason that caused the transport to close down.- Throws:
IOException- the io exception
-