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 TypeMethodDescriptionboolean
acceptsKey
(AuthenticationProtocolClient authentication, String username, String serviceToStart, SshPublicKey key) void
authenticate
(AuthenticationProtocolClient authentication, String serviceToStart) boolean
boolean
void
reset()
void
setAgent
(SshAgentClient agent) void
setPersistableProperties
(Properties properties) boolean
showAuthenticationDialog
(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:
reset
in classSshAuthenticationClient
-
getMethodName
- Specified by:
getMethodName
in 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:
authenticate
in classSshAuthenticationClient
- Parameters:
authentication
-serviceToStart
-- Throws:
IOException
TerminatedStateException
AuthenticationProtocolException
-
showAuthenticationDialog
- Parameters:
parent
-- Returns:
-
getPersistableProperties
- Specified by:
getPersistableProperties
in classSshAuthenticationClient
- Returns:
-
setPersistableProperties
- Specified by:
setPersistableProperties
in classSshAuthenticationClient
- Parameters:
properties
-
-
canAuthenticate
public boolean canAuthenticate()- Specified by:
canAuthenticate
in classSshAuthenticationClient
- Returns:
-
hasAcceptableKey
- Parameters:
ssh
-- Returns:
-