Package com.trilead.ssh2.auth
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 Summary
Fields Modifier and Type Field Description static StringPROPERTY_TIMEOUTstatic longTIMEOUT
-
Constructor Summary
Constructors Constructor Description AuthenticationManager(TransportManager tm)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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)booleangetPartialSuccess()String[]getRemainingMethods(String user)voidhandleEndMessage(Throwable cause)Called to inform that no more messages will be delivered.voidhandleMessage(byte[] msg, int msglen)Handle message.
-
-
-
Field Detail
-
PROPERTY_TIMEOUT
public static final String PROPERTY_TIMEOUT
-
TIMEOUT
public static final long TIMEOUT
-
-
Constructor Detail
-
AuthenticationManager
public AuthenticationManager(TransportManager tm)
-
-
Method Detail
-
getRemainingMethods
public String[] getRemainingMethods(String user) throws IOException
- Throws:
IOException
-
getPartialSuccess
public boolean getPartialSuccess()
-
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 IOExceptionDescription copied from interface:MessageHandlerHandle message.- Specified by:
handleMessagein interfaceMessageHandler- Parameters:
msg- the msgmsglen- the msglen- Throws:
IOException- the io exception
-
handleEndMessage
public void handleEndMessage(Throwable cause) throws IOException
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
-
-