|
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
public class 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(java.lang.String userName,
java.io.File keyFile,
java.lang.String passphrase,
int portNumber)
Deprecated. Use newInstance(String, File, char[], int) method |
|
BasicAuthenticationManager(java.lang.String userName,
java.lang.String password)
Deprecated. Use newInstance(String, char[]) method |
|
BasicAuthenticationManager(SVNAuthentication[] authentications)
Creates an auth manager given user credentials to use. |
|
| Method Summary | |
|---|---|
void |
acknowledgeAuthentication(boolean accepted,
java.lang.String kind,
java.lang.String realm,
SVNErrorMessage errorMessage,
SVNAuthentication authentication)
Does nothing. |
static void |
acknowledgeAuthentication(boolean accepted,
java.lang.String kind,
java.lang.String realm,
SVNErrorMessage errorMessage,
SVNAuthentication authentication,
SVNURL accessedURL,
ISVNAuthenticationManager authManager)
Utility method to acknowledge successful or failed authentication attempt |
void |
acknowledgeProxyContext(boolean accepted,
SVNErrorMessage errorMessage)
Does nothing. |
void |
acknowledgeTrustManager(javax.net.ssl.TrustManager manager)
Does nothing. |
void |
dismissSensitiveData()
Dismiss cached sensitive data (e.g. password) Calling this method clears and removes all credentials stored in this authentication manager. |
int |
getConnectTimeout(SVNRepository repository)
Returns connection timeout value. |
SVNAuthentication |
getFirstAuthentication(java.lang.String kind,
java.lang.String realm,
SVNURL url)
Returns the first user's authentication credentials. |
SVNAuthentication |
getNextAuthentication(java.lang.String kind,
java.lang.String realm,
SVNURL url)
Returns next user authentication credentials. |
java.lang.String |
getProxyHost()
Returns the proxy host name. |
ISVNProxyManager |
getProxyManager(SVNURL url)
Returns itself as a proxy manager. |
java.lang.String |
getProxyPassword()
Deprecated. Use getProxyPasswordValue() |
char[] |
getProxyPasswordValue()
Returns the password to authenticate against the proxy server. |
int |
getProxyPort()
Returns the proxy port number. |
java.lang.String |
getProxyUserName()
Returns the proxy user name. |
int |
getReadTimeout(SVNRepository repository)
Returns connection timeout value. |
javax.net.ssl.TrustManager |
getTrustManager(SVNURL url)
Returns null. |
boolean |
isAuthenticationForced()
Tells whether authentication should be tried despite not being challenged from the server yet. |
static BasicAuthenticationManager |
newInstance(java.lang.String userName,
char[] password)
Creates an auth manager given a user credential - a username and password. |
static BasicAuthenticationManager |
newInstance(java.lang.String userName,
java.io.File keyFile,
char[] passphrase,
int portNumber)
Creates an auth manager given a user credential - a username and an ssh private key. |
static BasicAuthenticationManager |
newInstance(SVNAuthentication[] credentials)
Creates an auth manager given user credentials to use. |
void |
setAuthenticationForced(boolean forced)
Sets whether authentication should be forced or not. |
void |
setAuthenticationProvider(ISVNAuthenticationProvider provider)
Does nothing. |
void |
setAuthentications(SVNAuthentication[] authentications)
Sets the given user credentials to this manager. |
void |
setProxy(java.lang.String proxyHost,
int proxyPort,
java.lang.String proxyUserName,
char[] proxyPassword)
Sets a proxy server context to this manager. |
void |
setProxy(java.lang.String proxyHost,
int proxyPort,
java.lang.String proxyUserName,
java.lang.String proxyPassword)
Deprecated. |
void |
verifyHostKey(java.lang.String hostName,
int port,
java.lang.String keyAlgorithm,
byte[] hostKey)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BasicAuthenticationManager(java.lang.String userName,
java.lang.String password)
newInstance(String, char[]) method
userName - a usernamepassword - a password
public BasicAuthenticationManager(java.lang.String userName,
java.io.File keyFile,
java.lang.String passphrase,
int portNumber)
newInstance(String, File, char[], int) method
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 credentials| Method Detail |
|---|
public static BasicAuthenticationManager newInstance(java.lang.String userName,
char[] password)
userName - a usernamepassword - a password
public static BasicAuthenticationManager newInstance(java.lang.String userName,
java.io.File keyFile,
char[] 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 static BasicAuthenticationManager newInstance(SVNAuthentication[] credentials)
credentials - user credentials
public static void acknowledgeAuthentication(boolean accepted,
java.lang.String kind,
java.lang.String realm,
SVNErrorMessage errorMessage,
SVNAuthentication authentication,
SVNURL accessedURL,
ISVNAuthenticationManager authManager)
throws SVNException
SVNExceptionpublic void setAuthentications(SVNAuthentication[] authentications)
authentications - user credentials
public void setProxy(java.lang.String proxyHost,
int proxyPort,
java.lang.String proxyUserName,
java.lang.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 machine
public void setProxy(java.lang.String proxyHost,
int proxyPort,
java.lang.String proxyUserName,
char[] 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 machine
public SVNAuthentication getFirstAuthentication(java.lang.String kind,
java.lang.String realm,
SVNURL url)
throws SVNException
getFirstAuthentication in interface ISVNAuthenticationManagerkind - credentials kind; valid kinds are ISVNAuthenticationManager.SSH,
ISVNAuthenticationManager.PASSWORD, ISVNAuthenticationManager.USERNAME,
ISVNAuthenticationManager.SSL, ISVNAuthenticationManager.USERNAMErealm - authentication realmurl - repository url
SVNException - exception with SVNErrorCode.RA_NOT_AUTHORIZED
error code - in case of invalid kind
public SVNAuthentication getNextAuthentication(java.lang.String kind,
java.lang.String realm,
SVNURL url)
throws SVNException
getFirstAuthentication(String, String, SVNURL) failed to authenticate the user.
getNextAuthentication in interface ISVNAuthenticationManagerkind - credentials kind; valid kinds are ISVNAuthenticationManager.SSH,
ISVNAuthenticationManager.PASSWORD, ISVNAuthenticationManager.USERNAME,
ISVNAuthenticationManager.SSL, ISVNAuthenticationManager.USERNAMErealm - authentication realmurl - repository url
SVNException - exception with SVNErrorCode.RA_NOT_AUTHORIZED
error code - in case of invalid kindpublic void setAuthenticationProvider(ISVNAuthenticationProvider provider)
setAuthenticationProvider in interface ISVNAuthenticationManagerprovider -
public ISVNProxyManager getProxyManager(SVNURL url)
throws SVNException
getProxyManager in interface ISVNAuthenticationManagerurl - a repository location that will be accessed
over the proxy server for which a manager is needed
SVNException
public javax.net.ssl.TrustManager getTrustManager(SVNURL url)
throws SVNException
getTrustManager in interface ISVNAuthenticationManagerurl - repository url
SVNException
public void acknowledgeAuthentication(boolean accepted,
java.lang.String kind,
java.lang.String realm,
SVNErrorMessage errorMessage,
SVNAuthentication authentication)
acknowledgeAuthentication in interface ISVNAuthenticationManageraccepted - kind - realm - errorMessage - authentication - public void acknowledgeTrustManager(javax.net.ssl.TrustManager manager)
acknowledgeTrustManager in interface ISVNAuthenticationManagermanager - public boolean isAuthenticationForced()
setAuthenticationForced(boolean).
isAuthenticationForced in interface ISVNAuthenticationManagerpublic void setAuthenticationForced(boolean forced)
forced - authentication force flagisAuthenticationForced()public java.lang.String getProxyHost()
getProxyHost in interface ISVNProxyManagersetProxy(String, int, String, String)
methodpublic int getProxyPort()
getProxyPort in interface ISVNProxyManagersetProxy(String, int, String, String)
methodpublic java.lang.String getProxyUserName()
getProxyUserName in interface ISVNProxyManagersetProxy(String, int, String, String)
methodpublic java.lang.String getProxyPassword()
getProxyPasswordValue()
getProxyPassword in interface ISVNProxyManagersetProxy(String, int, String, String)
methodpublic char[] getProxyPasswordValue()
getProxyPasswordValue in interface ISVNProxyManagerExsetProxy(String, int, String, String)
method
public void acknowledgeProxyContext(boolean accepted,
SVNErrorMessage errorMessage)
acknowledgeProxyContext in interface ISVNProxyManageraccepted - errorMessage - public int getReadTimeout(SVNRepository repository)
http
or https access operations. If repository uses a different access protocol,
the return value will be 0.
getReadTimeout in interface ISVNAuthenticationManagerrepository - repository access object
public int getConnectTimeout(SVNRepository repository)
http
or https access operations. If repository uses a different access protocol,
the return value will be 0.
getConnectTimeout in interface ISVNAuthenticationManagerrepository - repository access object
public void verifyHostKey(java.lang.String hostName,
int port,
java.lang.String keyAlgorithm,
byte[] hostKey)
throws SVNException
verifyHostKey in interface ISVNSSHHostVerifierSVNExceptionpublic void dismissSensitiveData()
|
SVNKit Home]]> | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||