Package com.sshtools.j2ssh.agent
Class AgentAuthenticationClient
- java.lang.Object
-
- com.sshtools.j2ssh.authentication.SshAuthenticationClient
-
- com.sshtools.j2ssh.agent.AgentAuthenticationClient
-
public class AgentAuthenticationClient extends SshAuthenticationClient
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 Modifier and Type Field Description protected SshAgentClientagent
-
Constructor Summary
Constructors Constructor Description AgentAuthenticationClient()Creates a new AgentAuthenticationClient object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanacceptsKey(AuthenticationProtocolClient authentication, java.lang.String username, java.lang.String serviceToStart, SshPublicKey key)voidauthenticate(AuthenticationProtocolClient authentication, java.lang.String serviceToStart)booleancanAuthenticate()java.lang.StringgetMethodName()java.util.PropertiesgetPersistableProperties()booleanhasAcceptableKey(SshClient ssh)voidreset()voidsetAgent(SshAgentClient agent)voidsetPersistableProperties(java.util.Properties properties)booleanshowAuthenticationDialog(java.awt.Component parent)-
Methods inherited from class com.sshtools.j2ssh.authentication.SshAuthenticationClient
canPrompt, getAuthenticationPrompt, getUsername, setAuthenticationPrompt, setUsername
-
-
-
-
Field Detail
-
agent
protected SshAgentClient agent
-
-
Method Detail
-
setAgent
public void setAgent(SshAgentClient agent)
-
reset
public void reset()
- Specified by:
resetin classSshAuthenticationClient
-
getMethodName
public java.lang.String getMethodName()
- Specified by:
getMethodNamein classSshAuthenticationClient- Returns:
-
acceptsKey
public boolean acceptsKey(AuthenticationProtocolClient authentication, java.lang.String username, java.lang.String serviceToStart, SshPublicKey key) throws java.io.IOException
- Parameters:
authentication-username-serviceToStart-key-- Returns:
- Throws:
java.io.IOException
-
authenticate
public void authenticate(AuthenticationProtocolClient authentication, java.lang.String serviceToStart) throws java.io.IOException, TerminatedStateException
- Specified by:
authenticatein classSshAuthenticationClient- Parameters:
authentication-serviceToStart-- Throws:
java.io.IOExceptionTerminatedStateExceptionAuthenticationProtocolException
-
showAuthenticationDialog
public boolean showAuthenticationDialog(java.awt.Component parent)
- Parameters:
parent-- Returns:
-
getPersistableProperties
public java.util.Properties getPersistableProperties()
- Specified by:
getPersistablePropertiesin classSshAuthenticationClient- Returns:
-
setPersistableProperties
public void setPersistableProperties(java.util.Properties properties)
- Specified by:
setPersistablePropertiesin classSshAuthenticationClient- Parameters:
properties-
-
canAuthenticate
public boolean canAuthenticate()
- Specified by:
canAuthenticatein classSshAuthenticationClient- Returns:
-
hasAcceptableKey
public boolean hasAcceptableKey(SshClient ssh)
- Parameters:
ssh-- Returns:
-
-