Package org.tmatesoft.svn.core.auth
Class SVNSSHAuthentication
java.lang.Object
org.tmatesoft.svn.core.auth.SVNAuthentication
org.tmatesoft.svn.core.auth.SVNSSHAuthentication
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()
.
- Since:
- 1.2
- Version:
- 1.3
- Author:
- TMate Software Ltd.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSVNSSHAuthentication
(String userName, char[] privateKey, String passphrase, int portNumber, boolean storageAllowed) Deprecated.SVNSSHAuthentication
(String userName, char[] privateKey, String passphrase, int portNumber, boolean storageAllowed, SVNURL url, boolean isPartial) Deprecated.SVNSSHAuthentication
(String userName, AgentProxy agentProxy, int portNumber, SVNURL url, boolean isPartial) Deprecated.SVNSSHAuthentication
(String userName, File keyFile, String passphrase, int portNumber, boolean storageAllowed) Deprecated.SVNSSHAuthentication
(String userName, File keyFile, String passphrase, int portNumber, boolean storageAllowed, SVNURL url, boolean isPartial) Deprecated.SVNSSHAuthentication
(String userName, String password, int portNumber, boolean storageAllowed) Deprecated.SVNSSHAuthentication
(String userName, String password, int portNumber, boolean storageAllowed, SVNURL url, boolean isPartial) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptioncopy()
Creates a deep copy of this credentials object.void
Disposes sensitive data (e.g. password) stored in this object.AgentProxy
Tells whether this authentication object has a SSH agent connectionDeprecated.UsegetPassphraseValue()
methodchar[]
Returns the password to the ssh private key.Deprecated.UsegetPasswordValue()
methodchar[]
Returns password.int
Returns the number of the port across which an ssh tunnel is established.char[]
Returns ssh private key.Returns the File representation referring to the file with the user's ssh private key.boolean
Tells whether this authentication object contains a user's private key.static SVNSSHAuthentication
newInstance
(String userName, char[] keyValue, char[] passphrase, int portNumber, boolean storageAllowed, SVNURL url, boolean isPartial) Creates a user credential object for authenticating over an ssh tunnel.static SVNSSHAuthentication
newInstance
(String userName, char[] password, int portNumber, boolean storageAllowed, SVNURL url, boolean isPartial) Creates a user credential object for authenticating over an ssh tunnel.static SVNSSHAuthentication
newInstance
(String userName, AgentProxy agentProxy, int portNumber, SVNURL url, boolean isPartial) Creates a user credential object for authenticating over an ssh tunnel.static SVNSSHAuthentication
newInstance
(String userName, File keyFile, char[] passphrase, int portNumber, boolean storageAllowed, SVNURL url, boolean isPartial) Creates a user credential object for authenticating over an ssh tunnel.Methods inherited from class org.tmatesoft.svn.core.auth.SVNAuthentication
copyOf, getKind, getURL, getUserName, isPartial, isStorageAllowed
-
Constructor Details
-
SVNSSHAuthentication
public SVNSSHAuthentication(String userName, String password, int portNumber, boolean storageAllowed) Deprecated. -
SVNSSHAuthentication
public SVNSSHAuthentication(String userName, String password, int portNumber, boolean storageAllowed, SVNURL url, boolean isPartial) Deprecated.- Since:
- 1.3.1
-
SVNSSHAuthentication
public SVNSSHAuthentication(String userName, File keyFile, String passphrase, int portNumber, boolean storageAllowed) Deprecated. -
SVNSSHAuthentication
public SVNSSHAuthentication(String userName, File keyFile, String passphrase, int portNumber, boolean storageAllowed, SVNURL url, boolean isPartial) Deprecated. -
SVNSSHAuthentication
public SVNSSHAuthentication(String userName, char[] privateKey, String passphrase, int portNumber, boolean storageAllowed) Deprecated. -
SVNSSHAuthentication
public SVNSSHAuthentication(String userName, char[] privateKey, String passphrase, int portNumber, boolean storageAllowed, SVNURL url, boolean isPartial) Deprecated. -
SVNSSHAuthentication
public SVNSSHAuthentication(String userName, AgentProxy agentProxy, int portNumber, SVNURL url, boolean isPartial) Deprecated.
-
-
Method Details
-
newInstance
public static SVNSSHAuthentication newInstance(String userName, char[] password, int portNumber, boolean storageAllowed, SVNURL url, boolean isPartial) Creates a user credential object for authenticating over an ssh tunnel.- Parameters:
userName
- the name of a user to authenticatepassword
- the user's passwordportNumber
- the number of a port to establish an ssh tunnel overstorageAllowed
- if true then this credential is allowed to be stored in the global auth cache, otherwise noturl
- url these credentials are applied to- Since:
- 1.8.9
-
newInstance
public static SVNSSHAuthentication newInstance(String userName, File keyFile, char[] passphrase, int portNumber, boolean storageAllowed, SVNURL url, boolean isPartial) Creates a user credential object for authenticating over an ssh tunnel.- Parameters:
userName
- the name of a user to authenticatekeyFile
- the user's ssh private key filepassphrase
- a password to the ssh private keyportNumber
- the number of a port to establish an ssh tunnel overstorageAllowed
- if true then this credential is allowed to be stored in the global auth cache, otherwise noturl
- url these credentials are applied to- Since:
- 1.8.9
-
newInstance
public static SVNSSHAuthentication newInstance(String userName, char[] keyValue, char[] passphrase, int portNumber, boolean storageAllowed, SVNURL url, boolean isPartial) Creates a user credential object for authenticating over an ssh tunnel.- Parameters:
userName
- the name of a user to authenticatepassphrase
- a password to the ssh private keyportNumber
- the number of a port to establish an ssh tunnel overstorageAllowed
- if true then this credential is allowed to be stored in the global auth cache, otherwise noturl
- url these credentials are applied toprivateKey
- the user's ssh private key- Since:
- 1.8.9
-
newInstance
public static SVNSSHAuthentication newInstance(String userName, AgentProxy agentProxy, int portNumber, SVNURL url, boolean isPartial) Creates a user credential object for authenticating over an ssh tunnel.- Parameters:
userName
- the name of a user to authenticateagentProxy
- SSH agent proxyportNumber
- the number of a port to establish an ssh tunnel overurl
- url these credentials are applied to- Since:
- 1.8.9
-
getPassword
Deprecated.UsegetPasswordValue()
methodReturns password. This is used when an ssh private key is not used.- Returns:
- the user's password
-
getPasswordValue
public char[] getPasswordValue()Returns password. This is used when an ssh private key is not used.- Returns:
- password
- Since:
- 1.8.9
-
getPassphrase
Deprecated.UsegetPassphraseValue()
methodReturns the password to the ssh private key.- Returns:
- the password to the private key
- See Also:
-
getPassphraseValue
public char[] getPassphraseValue()Returns the password to the ssh private key.- Returns:
- the password to the private key
- Since:
- 1.8.9
- See Also:
-
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
-
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
-
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
-
hasPrivateKey
public boolean hasPrivateKey()Tells whether this authentication object contains a user's private key.- Returns:
- true if either
getPrivateKey()
orgetPrivateKeyFile()
returns non-null - Since:
- 1.2.0
-
getAgentProxy
public AgentProxy getAgentProxy()Tells whether this authentication object has a SSH agent connection -
dismissSensitiveData
public void dismissSensitiveData()Description copied from class:SVNAuthentication
Disposes sensitive data (e.g. password) stored in this object.- Overrides:
dismissSensitiveData
in classSVNAuthentication
-
copy
Description copied from class:SVNAuthentication
Creates a deep copy of this credentials object. Sensitive data (e.g. password) is copied too.- Overrides:
copy
in classSVNAuthentication
- Returns:
- copy of this object.
-
invalid input: 'method'