org.tmatesoft.svn.core.auth

Class SVNSSHAuthentication

public class SVNSSHAuthentication extends SVNAuthentication

The SVNSSHAuthentication class represents a kind of credentials used to authenticate a user over an SSH tunnel.

To obtain an ssh user credential, specify the SSH kind to credentials getter method of ISVNAuthenticationManager: getFirstAuthentication(), getNextAuthentication().

Version: 1.1.1

Author: TMate Software Ltd.

See Also: ISVNAuthenticationManager

Constructor Summary
SVNSSHAuthentication(String userName, String password, int portNumber, boolean storageAllowed)
Creates a user credential object for authenticating over an ssh tunnel.
SVNSSHAuthentication(String userName, File keyFile, String passphrase, int portNumber, boolean storageAllowed)
Creates a user credential object for authenticating over an ssh tunnel.
SVNSSHAuthentication(String userName, char[] privateKey, String passphrase, int portNumber, boolean storageAllowed)
Creates a user credential object for authenticating over an ssh tunnel.
Method Summary
StringgetPassphrase()
Returns the password to the ssh private key.
StringgetPassword()
Returns the user account's password.
intgetPortNumber()
Returns the number of the port across which an ssh tunnel is established.
char[]getPrivateKey()
Returns ssh private key.
FilegetPrivateKeyFile()
Returns the File representation referring to the file with the user's ssh private key.
booleanhasPrivateKey()

Constructor Detail

SVNSSHAuthentication

public SVNSSHAuthentication(String userName, String password, int portNumber, boolean storageAllowed)
Creates a user credential object for authenticating over an ssh tunnel. This kind of credentials is used when an ssh connection requires a user password instead of an ssh private key.

Parameters: userName the name of a user to authenticate password the user's password portNumber the number of a port to establish an ssh tunnel over storageAllowed if true then this credential is allowed to be stored in the global auth cache, otherwise not

SVNSSHAuthentication

public SVNSSHAuthentication(String userName, File keyFile, String passphrase, int portNumber, boolean storageAllowed)
Creates a user credential object for authenticating over an ssh tunnel. This kind of credentials is used when an ssh connection requires an ssh private key.

Parameters: userName the name of a user to authenticate keyFile the user's ssh private key file passphrase a password to the ssh private key portNumber the number of a port to establish an ssh tunnel over storageAllowed if true then this credential is allowed to be stored in the global auth cache, otherwise not

SVNSSHAuthentication

public SVNSSHAuthentication(String userName, char[] privateKey, String passphrase, int portNumber, boolean storageAllowed)
Creates a user credential object for authenticating over an ssh tunnel. This kind of credentials is used when an ssh connection requires an ssh private key.

Parameters: userName the name of a user to authenticate privateKey the user's ssh private key passphrase a password to the ssh private key portNumber the number of a port to establish an ssh tunnel over storageAllowed if true then this credential is allowed to be stored in the global auth cache, otherwise not

Method Detail

getPassphrase

public String getPassphrase()
Returns the password to the ssh private key.

Returns: the password to the private key

See Also: getPrivateKeyFile

getPassword

public String getPassword()
Returns the user account's password. This is used when an ssh private key is not used.

Returns: the user's password

getPortNumber

public int getPortNumber()
Returns the number of the port across which an ssh tunnel is established.

Returns: the port number to establish an ssh tunnel over

getPrivateKey

public char[] getPrivateKey()
Returns ssh private key. If the private key is encrypted with a passphrase, it should have been provided to an appropriate constructor.

Returns: the user's private key file

getPrivateKeyFile

public File getPrivateKeyFile()
Returns the File representation referring to the file with the user's ssh private key. If the private key is encrypted with a passphrase, it should have been provided to an appropriate constructor.

Returns: the user's private key file

hasPrivateKey

public boolean hasPrivateKey()
Copyright © 2004-2007 TMate Software Ltd. All Rights Reserved.