org.tmatesoft.svn.core.auth

Class BasicAuthenticationManager

public class BasicAuthenticationManager extends Object implements ISVNAuthenticationManager, ISVNProxyManager

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.

Version: 1.1.1

Author: TMate Software Ltd.

See Also: ISVNAuthenticationProvider

Constructor Summary
BasicAuthenticationManager(String userName, String password)
Creates an auth manager given a user credential - a username and password.
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(SVNAuthentication[] authentications)
Creates an auth manager given user credentials to use.
Method Summary
voidacknowledgeAuthentication(boolean accepted, String kind, String realm, SVNErrorMessage errorMessage, SVNAuthentication authentication)
Does nothing.
voidacknowledgeProxyContext(boolean accepted, SVNErrorMessage errorMessage)
Does nothing.
SVNAuthenticationgetFirstAuthentication(String kind, String realm, SVNURL url)
longgetHTTPTimeout(SVNRepository repository)
SVNAuthenticationgetNextAuthentication(String kind, String realm, SVNURL url)
StringgetProxyHost()
ISVNProxyManagergetProxyManager(SVNURL url)
Returns itself as a proxy manager.
StringgetProxyPassword()
intgetProxyPort()
StringgetProxyUserName()
ISVNSSLManagergetSSLManager(SVNURL url)
Returns null.
booleanisAuthenticationForced()
voidsetAuthenticationForced(boolean forced)
voidsetAuthenticationProvider(ISVNAuthenticationProvider provider)
Does nothing.
voidsetAuthentications(SVNAuthentication[] authentications)
Sets the given user credentials to this manager.
voidsetProxy(String proxyHost, int proxyPort, String proxyUserName, String proxyPassword)
Sets a proxy server context to this manager.
voidsetRuntimeStorage(ISVNAuthenticationStorage storage)
Does nothing.

Constructor Detail

BasicAuthenticationManager

public BasicAuthenticationManager(String userName, String password)
Creates an auth manager given a user credential - a username and password.

Parameters: userName a username password a password

BasicAuthenticationManager

public BasicAuthenticationManager(String userName, File keyFile, String passphrase, int portNumber)
Creates an auth manager given a user credential - a username and an ssh private key.

Parameters: userName a username keyFile a private key file passphrase a password to the private key portNumber a port number over which an ssh tunnel is established

BasicAuthenticationManager

public BasicAuthenticationManager(SVNAuthentication[] authentications)
Creates an auth manager given user credentials to use.

Parameters: authentications user credentials

Method Detail

acknowledgeAuthentication

public void acknowledgeAuthentication(boolean accepted, String kind, String realm, SVNErrorMessage errorMessage, SVNAuthentication authentication)
Does nothing.

Parameters: accepted kind realm errorMessage authentication

acknowledgeProxyContext

public void acknowledgeProxyContext(boolean accepted, SVNErrorMessage errorMessage)
Does nothing.

Parameters: accepted errorMessage

getFirstAuthentication

public SVNAuthentication getFirstAuthentication(String kind, String realm, SVNURL url)

getHTTPTimeout

public long getHTTPTimeout(SVNRepository repository)

getNextAuthentication

public SVNAuthentication getNextAuthentication(String kind, String realm, SVNURL url)

getProxyHost

public String getProxyHost()

getProxyManager

public ISVNProxyManager getProxyManager(SVNURL url)
Returns itself as a proxy manager.

Parameters: url a repository location that will be accessed over the proxy server for which a manager is needed

Returns: a proxy manager

Throws: SVNException

getProxyPassword

public String getProxyPassword()

getProxyPort

public int getProxyPort()

getProxyUserName

public String getProxyUserName()

getSSLManager

public ISVNSSLManager getSSLManager(SVNURL url)
Returns null.

Parameters: url

Returns: null

Throws: SVNException

isAuthenticationForced

public boolean isAuthenticationForced()

setAuthenticationForced

public void setAuthenticationForced(boolean forced)

setAuthenticationProvider

public void setAuthenticationProvider(ISVNAuthenticationProvider provider)
Does nothing.

Parameters: provider

setAuthentications

public void setAuthentications(SVNAuthentication[] authentications)
Sets the given user credentials to this manager.

Parameters: authentications user credentials

setProxy

public void setProxy(String proxyHost, int proxyPort, String proxyUserName, String proxyPassword)
Sets a proxy server context to this manager.

Parameters: proxyHost a proxy server hostname proxyPort a proxy server port proxyUserName a username to supply to a proxy machine proxyPassword a password to supply to a proxy machine

setRuntimeStorage

public void setRuntimeStorage(ISVNAuthenticationStorage storage)
Does nothing.

Parameters: storage

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