com.sshtools.j2ssh.agent

Class 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, String username, String serviceToStart, SshPublicKey key)
void
authenticate(AuthenticationProtocolClient authentication, String serviceToStart)
boolean
canAuthenticate()
String
getMethodName()
Properties
getPersistableProperties()
boolean
hasAcceptableKey(SshClient ssh)
void
reset()
void
setAgent(SshAgentClient agent)
void
setPersistableProperties(Properties properties)
boolean
showAuthenticationDialog(Component parent)

Methods inherited from class com.sshtools.j2ssh.authentication.SshAuthenticationClient

authenticate, canAuthenticate, canPrompt, getAuthenticationPrompt, getMethodName, getPersistableProperties, getUsername, reset, setAuthenticationPrompt, setPersistableProperties, setUsername

Field Details

agent

protected SshAgentClient agent

Constructor Details

AgentAuthenticationClient

public AgentAuthenticationClient()
Creates a new AgentAuthenticationClient object.

Method Details

acceptsKey

public boolean acceptsKey(AuthenticationProtocolClient authentication,
                          String username,
                          String serviceToStart,
                          SshPublicKey key)
            throws IOException
Parameters:
authentication -
username -
serviceToStart -
key -
Returns:

authenticate

public void authenticate(AuthenticationProtocolClient authentication,
                         String serviceToStart)
            throws IOException,
                   TerminatedStateException
Overrides:
authenticate in interface SshAuthenticationClient
Parameters:
authentication -
serviceToStart -

canAuthenticate

public boolean canAuthenticate()
Overrides:
canAuthenticate in interface SshAuthenticationClient
Returns:

getMethodName

public String getMethodName()
Overrides:
getMethodName in interface SshAuthenticationClient
Returns:

getPersistableProperties

public Properties getPersistableProperties()
Overrides:
getPersistableProperties in interface SshAuthenticationClient
Returns:

hasAcceptableKey

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

reset

public void reset()
Overrides:
reset in interface SshAuthenticationClient

setAgent

public void setAgent(SshAgentClient agent)

setPersistableProperties

public void setPersistableProperties(Properties properties)
Overrides:
setPersistableProperties in interface SshAuthenticationClient
Parameters:
properties -

showAuthenticationDialog

public boolean showAuthenticationDialog(Component parent)
Parameters:
parent -
Returns:

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