|
SVNKit Home | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.tmatesoft.svn.core.auth.BasicAuthenticationManager
The BasicAuthenticationManager is a simple implementation of ISVNAuthenticationManager for storing and providing credentials without using auth providers. A basic manager simply keeps the user credentials provided. Also this manager may store a single proxy server options context (for HHTP requests to go through a particular proxy server).
This manager does not use authentication providers (ISVNAuthenticationProvider) but only those credentials that was supplied to its constructor. Also this manager never caches credentials.
This manager is not used in SVNKit internals. You may use a default
manager (how to get it read javadoc for ISVNAuthenticationManager
),
this basic manager or implement your own one.
ISVNAuthenticationProvider
Field Summary |
Fields inherited from interface org.tmatesoft.svn.core.auth.ISVNAuthenticationManager |
PASSWORD, SSH, SSL, USERNAME |
Constructor Summary | |
BasicAuthenticationManager(String userName,
File keyFile,
String passphrase,
int portNumber)
Creates an auth manager given a user credential - a username and an ssh private key. |
|
BasicAuthenticationManager(String userName,
String password)
Creates an auth manager given a user credential - a username and password. |
|
BasicAuthenticationManager(SVNAuthentication[] authentications)
Creates an auth manager given user credentials to use. |
Method Summary | |
void |
acknowledgeAuthentication(boolean accepted,
String kind,
String realm,
SVNErrorMessage errorMessage,
SVNAuthentication authentication)
Does nothing. |
void |
acknowledgeProxyContext(boolean accepted,
SVNErrorMessage errorMessage)
Does nothing. |
SVNAuthentication |
getFirstAuthentication(String kind,
String realm,
SVNURL url)
Retrieves the first user credential. |
long |
getHTTPTimeout(SVNRepository repository)
Returns a connection timeout value. |
SVNAuthentication |
getNextAuthentication(String kind,
String realm,
SVNURL url)
Retrieves the next user credential if the first try failed. |
String |
getProxyHost()
Returns the proxy host for HTTP connection. |
ISVNProxyManager |
getProxyManager(SVNURL url)
Returns itself as a proxy manager. |
String |
getProxyPassword()
Returns the password to supply to the proxy machine. |
int |
getProxyPort()
Returns the port number on the proxy host to use. |
String |
getProxyUserName()
Returns the username to supply to the proxy machine. |
ISVNSSLManager |
getSSLManager(SVNURL url)
Returns null. |
boolean |
isAuthenticationForced()
Checks whether client should send authentication credentials to a repository server not waiting for the server's challenge. |
void |
setAuthenticationForced(boolean forced)
Specifies the way how credentials are to be supplied to a repository server. |
void |
setAuthenticationProvider(ISVNAuthenticationProvider provider)
Does nothing. |
void |
setAuthentications(SVNAuthentication[] authentications)
Sets the given user credentials to this manager. |
void |
setProxy(String proxyHost,
int proxyPort,
String proxyUserName,
String proxyPassword)
Sets a proxy server context to this manager. |
void |
setRuntimeStorage(ISVNAuthenticationStorage storage)
Does nothing. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public BasicAuthenticationManager(String userName, String password)
userName
- a usernamepassword
- a passwordpublic BasicAuthenticationManager(String userName, File keyFile, String passphrase, int portNumber)
userName
- a usernamekeyFile
- a private key filepassphrase
- a password to the private keyportNumber
- a port number over which an ssh tunnel is establishedpublic BasicAuthenticationManager(SVNAuthentication[] authentications)
authentications
- user credentialsMethod Detail |
public void setAuthentications(SVNAuthentication[] authentications)
authentications
- user credentialspublic void setProxy(String proxyHost, int proxyPort, String proxyUserName, String proxyPassword)
proxyHost
- a proxy server hostnameproxyPort
- a proxy server portproxyUserName
- a username to supply to a proxy machineproxyPassword
- a password to supply to a proxy machinepublic SVNAuthentication getFirstAuthentication(String kind, String realm, SVNURL url) throws SVNException
ISVNAuthenticationManager
getNextAuthentication()
and sends the next credential.
For each credential kind
an implementor should return a kind-specific
credential. The following table matches kinds to proper credential classes:
getFirstAuthentication
in interface ISVNAuthenticationManager
kind
- a credential kindrealm
- a repository authentication realmurl
- a repository location that is to be accessed
SVNException
public SVNAuthentication getNextAuthentication(String kind, String realm, SVNURL url) throws SVNException
ISVNAuthenticationManager
getFirstAuthentication()
and
sends the retrieved credential.
For each credential kind
an implementor should return a kind-specific
credential. The following table matches kinds to proper credential classes:
getNextAuthentication
in interface ISVNAuthenticationManager
kind
- a credential kindrealm
- a repository authentication realmurl
- a repository location that is to be accessed
SVNException
public void setAuthenticationProvider(ISVNAuthenticationProvider provider)
setAuthenticationProvider
in interface ISVNAuthenticationManager
provider
- public ISVNProxyManager getProxyManager(SVNURL url) throws SVNException
getProxyManager
in interface ISVNAuthenticationManager
url
- a repository location that will be accessed
over the proxy server for which a manager is needed
SVNException
public ISVNSSLManager getSSLManager(SVNURL url) throws SVNException
getSSLManager
in interface ISVNAuthenticationManager
url
-
SVNException
public void acknowledgeAuthentication(boolean accepted, String kind, String realm, SVNErrorMessage errorMessage, SVNAuthentication authentication)
acknowledgeAuthentication
in interface ISVNAuthenticationManager
accepted
- kind
- realm
- errorMessage
- authentication
- public void setRuntimeStorage(ISVNAuthenticationStorage storage)
setRuntimeStorage
in interface ISVNAuthenticationManager
storage
- public boolean isAuthenticationForced()
ISVNAuthenticationManager
In some cases it may be necessary to send credentials beforehand, not waiting until the server asks to do it itself. To achieve such behaviour an implementor should return true from this routine.
isAuthenticationForced
in interface ISVNAuthenticationManager
ISVNAuthenticationManager.setAuthenticationForced(boolean)
public void setAuthenticationForced(boolean forced)
ISVNAuthenticationManager
setAuthenticationForced
in interface ISVNAuthenticationManager
forced
- true to force
credentials sending; false
to put off sending credentials till a server challengeISVNAuthenticationManager.isAuthenticationForced()
public String getProxyHost()
ISVNProxyManager
getProxyHost
in interface ISVNProxyManager
public int getProxyPort()
ISVNProxyManager
getProxyPort
in interface ISVNProxyManager
public String getProxyUserName()
ISVNProxyManager
getProxyUserName
in interface ISVNProxyManager
public String getProxyPassword()
ISVNProxyManager
getProxyPassword
in interface ISVNProxyManager
public void acknowledgeProxyContext(boolean accepted, SVNErrorMessage errorMessage)
acknowledgeProxyContext
in interface ISVNProxyManager
accepted
- errorMessage
- public long getHTTPTimeout(SVNRepository repository)
ISVNAuthenticationManager
getHTTPTimeout
in interface ISVNAuthenticationManager
repository
- a repository access driver
|
SVNKit Home | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |