Package com.sshtools.j2ssh.agent
Class AgentAuthenticationClient
java.lang.Object
com.sshtools.j2ssh.authentication.SshAuthenticationClient
com.sshtools.j2ssh.agent.AgentAuthenticationClient
Provides an application with an authentication mechanism that links to the sshtools agent; the agent stores private keys and can hash and sign data for the public key authentication request.
- Version:
- $Revision: 1.19 $
- Author:
- Lee David Painter
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanacceptsKey(AuthenticationProtocolClient authentication, String username, String serviceToStart, SshPublicKey key) voidauthenticate(AuthenticationProtocolClient authentication, String serviceToStart) booleanbooleanvoidreset()voidsetAgent(SshAgentClient agent) voidsetPersistableProperties(Properties properties) booleanshowAuthenticationDialog(Component parent) Methods inherited from class com.sshtools.j2ssh.authentication.SshAuthenticationClient
canPrompt, getAuthenticationPrompt, getUsername, setAuthenticationPrompt, setUsername
-
Field Details
-
agent
-
-
Constructor Details
-
AgentAuthenticationClient
public AgentAuthenticationClient()Creates a new AgentAuthenticationClient object.
-
-
Method Details
-
setAgent
-
reset
public void reset()- Specified by:
resetin classSshAuthenticationClient
-
getMethodName
- Specified by:
getMethodNamein classSshAuthenticationClient- Returns:
-
acceptsKey
public boolean acceptsKey(AuthenticationProtocolClient authentication, String username, String serviceToStart, SshPublicKey key) throws IOException - Parameters:
authentication-username-serviceToStart-key-- Returns:
- Throws:
IOException
-
authenticate
public void authenticate(AuthenticationProtocolClient authentication, String serviceToStart) throws IOException, TerminatedStateException - Specified by:
authenticatein classSshAuthenticationClient- Parameters:
authentication-serviceToStart-- Throws:
IOExceptionTerminatedStateExceptionAuthenticationProtocolException
-
showAuthenticationDialog
- Parameters:
parent-- Returns:
-
getPersistableProperties
- Specified by:
getPersistablePropertiesin classSshAuthenticationClient- Returns:
-
setPersistableProperties
- Specified by:
setPersistablePropertiesin classSshAuthenticationClient- Parameters:
properties-
-
canAuthenticate
public boolean canAuthenticate()- Specified by:
canAuthenticatein classSshAuthenticationClient- Returns:
-
hasAcceptableKey
- Parameters:
ssh-- Returns:
-