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, File keyFile, String passphrase, int portNumber, boolean storageAllowed)
Creates a user credential object for authenticating over an ssh tunnel.
SVNSSHAuthentication(String userName, String password, int portNumber, boolean storageAllowed)
Creates a user credential object for authenticating over an ssh tunnel.

Method Summary

String
getPassphrase()
Returns the password to the ssh private key.
String
getPassword()
Returns the user account's password.
int
getPortNumber()
Returns the number of the port across which an ssh tunnel is established.
File
getPrivateKeyFile()
Returns the File representation referring to the file with the user's ssh private key.

Methods inherited from class org.tmatesoft.svn.core.auth.SVNAuthentication

getKind, getUserName, isStorageAllowed

Constructor Details

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,
                            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

Method Details

getPassphrase

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

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

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

Copyright © 2004-2006 TMate Software Ltd. All Rights Reserved.