com.sshtools.j2ssh.agent
Class AgentAuthenticationClient

java.lang.Object
  extended by com.sshtools.j2ssh.authentication.SshAuthenticationClient
      extended by 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
protected  SshAgentClient agent
           
 
Constructor Summary
AgentAuthenticationClient()
          Creates a new AgentAuthenticationClient object.
 
Method Summary
 boolean acceptsKey(AuthenticationProtocolClient authentication, java.lang.String username, java.lang.String serviceToStart, SshPublicKey key)
           
 void authenticate(AuthenticationProtocolClient authentication, java.lang.String serviceToStart)
           
 boolean canAuthenticate()
           
 java.lang.String getMethodName()
           
 java.util.Properties getPersistableProperties()
           
 boolean hasAcceptableKey(SshClient ssh)
           
 void reset()
           
 void setAgent(SshAgentClient agent)
           
 void setPersistableProperties(java.util.Properties properties)
           
 boolean showAuthenticationDialog(java.awt.Component parent)
           
 
Methods inherited from class com.sshtools.j2ssh.authentication.SshAuthenticationClient
canPrompt, getAuthenticationPrompt, getUsername, setAuthenticationPrompt, setUsername
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

agent

protected SshAgentClient agent
Constructor Detail

AgentAuthenticationClient

public AgentAuthenticationClient()
Creates a new AgentAuthenticationClient object.

Method Detail

setAgent

public void setAgent(SshAgentClient agent)

reset

public void reset()
Specified by:
reset in class SshAuthenticationClient

getMethodName

public java.lang.String getMethodName()
Specified by:
getMethodName in class SshAuthenticationClient
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:
authenticate in class SshAuthenticationClient
Parameters:
authentication -
serviceToStart -
Throws:
java.io.IOException
TerminatedStateException
AuthenticationProtocolException

showAuthenticationDialog

public boolean showAuthenticationDialog(java.awt.Component parent)
Parameters:
parent -
Returns:

getPersistableProperties

public java.util.Properties getPersistableProperties()
Specified by:
getPersistableProperties in class SshAuthenticationClient
Returns:

setPersistableProperties

public void setPersistableProperties(java.util.Properties properties)
Specified by:
setPersistableProperties in class SshAuthenticationClient
Parameters:
properties -

canAuthenticate

public boolean canAuthenticate()
Specified by:
canAuthenticate in class SshAuthenticationClient
Returns:

hasAcceptableKey

public boolean hasAcceptableKey(SshClient ssh)
Parameters:
ssh -
Returns:


Copyright © 2002-2003 Lee David Painter & Contributors. All Rights Reserved.