Class DefaultSVNPersistentAuthenticationProvider
- java.lang.Object
-
- org.tmatesoft.svn.core.internal.wc.DefaultSVNPersistentAuthenticationProvider
-
- All Implemented Interfaces:
ISVNAuthenticationProvider,ISVNPersistentAuthenticationProvider
public class DefaultSVNPersistentAuthenticationProvider extends java.lang.Object implements ISVNAuthenticationProvider, ISVNPersistentAuthenticationProvider
- Version:
- 1.3
- Author:
- TMate Software Ltd.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classDefaultSVNPersistentAuthenticationProvider.GnomeKeyringPasswordStoragestatic interfaceDefaultSVNPersistentAuthenticationProvider.IPasswordStorageprotected classDefaultSVNPersistentAuthenticationProvider.MacOsKeychainPasswordStorageprotected classDefaultSVNPersistentAuthenticationProvider.SimplePasswordStorageprotected classDefaultSVNPersistentAuthenticationProvider.WinCryptPasswordStorage
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringGNOME_KEYRING_PASSTYPEstatic java.lang.StringGNOME_KEYRING_PASSWORD_STORAGEstatic java.lang.StringMAC_OS_KEYCHAIN_PASSTYPEstatic java.lang.StringMAC_OS_KEYCHAIN_PASSWORD_STORAGEstatic java.lang.StringSIMPLE_PASSTYPEstatic java.lang.StringWIN_CRYPT_PASSTYPEstatic java.lang.StringWINDOWS_CRYPTO_API_PASSWORD_STORAGE-
Fields inherited from interface org.tmatesoft.svn.core.auth.ISVNAuthenticationProvider
ACCEPTED, ACCEPTED_TEMPORARY, REJECTED
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedDefaultSVNPersistentAuthenticationProvider(java.io.File directory, java.lang.String userName, ISVNAuthenticationStorageOptions authOptions, DefaultSVNOptions defaultOptions, ISVNHostOptionsProvider hostOptionsProvider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intacceptServerAuthentication(SVNURL url, java.lang.String r, java.lang.Object serverAuth, boolean resultMayBeStored)Checks a server authentication certificate and whether accepts it (if the client trusts it) or not.protected DefaultSVNPersistentAuthenticationProvider.IPasswordStorage[]createPasswordStorages(DefaultSVNOptions options)protected java.lang.StringgetAuthFileName(java.lang.String realm)booleanisMSCapi(java.lang.String filepath)byte[]loadFingerprints(java.lang.String realm)protected java.lang.StringpreprocessRealm(java.lang.String realm)SVNAuthenticationrequestClientAuthentication(java.lang.String kind, SVNURL url, java.lang.String realm, SVNErrorMessage errorMessage, SVNAuthentication previousAuth, boolean authMayBeStored)Returns a next user credential of the specified kind for the given authentication realm.voidsaveAuthentication(SVNAuthentication auth, java.lang.String kind, java.lang.String realm)voidsaveFingerprints(java.lang.String realm, byte[] fingerprints)
-
-
-
Field Detail
-
WINDOWS_CRYPTO_API_PASSWORD_STORAGE
public static final java.lang.String WINDOWS_CRYPTO_API_PASSWORD_STORAGE
- See Also:
- Constant Field Values
-
MAC_OS_KEYCHAIN_PASSWORD_STORAGE
public static final java.lang.String MAC_OS_KEYCHAIN_PASSWORD_STORAGE
- See Also:
- Constant Field Values
-
GNOME_KEYRING_PASSWORD_STORAGE
public static final java.lang.String GNOME_KEYRING_PASSWORD_STORAGE
- See Also:
- Constant Field Values
-
SIMPLE_PASSTYPE
public static final java.lang.String SIMPLE_PASSTYPE
- See Also:
- Constant Field Values
-
WIN_CRYPT_PASSTYPE
public static final java.lang.String WIN_CRYPT_PASSTYPE
- See Also:
- Constant Field Values
-
MAC_OS_KEYCHAIN_PASSTYPE
public static final java.lang.String MAC_OS_KEYCHAIN_PASSTYPE
- See Also:
- Constant Field Values
-
GNOME_KEYRING_PASSTYPE
public static final java.lang.String GNOME_KEYRING_PASSTYPE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DefaultSVNPersistentAuthenticationProvider
protected DefaultSVNPersistentAuthenticationProvider(java.io.File directory, java.lang.String userName, ISVNAuthenticationStorageOptions authOptions, DefaultSVNOptions defaultOptions, ISVNHostOptionsProvider hostOptionsProvider)
-
-
Method Detail
-
createPasswordStorages
protected DefaultSVNPersistentAuthenticationProvider.IPasswordStorage[] createPasswordStorages(DefaultSVNOptions options)
-
requestClientAuthentication
public SVNAuthentication requestClientAuthentication(java.lang.String kind, SVNURL url, java.lang.String realm, SVNErrorMessage errorMessage, SVNAuthentication previousAuth, boolean authMayBeStored)
Description copied from interface:ISVNAuthenticationProviderReturns a next user credential of the specified kind for the given authentication realm.If this provider has got more than one credentials (say, a list of credentials), to get the first one of them
previousAuthis set to null.- Specified by:
requestClientAuthenticationin interfaceISVNAuthenticationProvider- Parameters:
kind- a credential kind (for example, like those defined inISVNAuthenticationManager)url- a repository location that is to be accessedrealm- a repository authentication realm (host, port, realm string)errorMessage- the recent authentication failure error messagepreviousAuth- the credential that was previously retrieved (to tell if it's not accepted)authMayBeStored- if true then the returned credential can be cached, otherwise it won't be cached anyway- Returns:
- a next user credential
-
preprocessRealm
protected java.lang.String preprocessRealm(java.lang.String realm)
-
isMSCapi
public boolean isMSCapi(java.lang.String filepath)
-
saveAuthentication
public void saveAuthentication(SVNAuthentication auth, java.lang.String kind, java.lang.String realm) throws SVNException
- Specified by:
saveAuthenticationin interfaceISVNPersistentAuthenticationProvider- Throws:
SVNException
-
getAuthFileName
protected java.lang.String getAuthFileName(java.lang.String realm)
-
acceptServerAuthentication
public int acceptServerAuthentication(SVNURL url, java.lang.String r, java.lang.Object serverAuth, boolean resultMayBeStored)
Description copied from interface:ISVNAuthenticationProviderChecks a server authentication certificate and whether accepts it (if the client trusts it) or not.This method is used by an SSL manager (see
DefaultSVNSSLTrustManager).- Specified by:
acceptServerAuthenticationin interfaceISVNAuthenticationProvider- Parameters:
url- a repository location that is accessedr- a repository authentication realm (host, port, realm string)serverAuth- a server certificate objectresultMayBeStored- if true then the server certificate can be cached, otherwise not- Returns:
- the result of the certificate check (
ISVNAuthenticationProvider.REJECTED,ISVNAuthenticationProvider.ACCEPTED_TEMPORARY, orISVNAuthenticationProvider.ACCEPTED)
-
loadFingerprints
public byte[] loadFingerprints(java.lang.String realm)
- Specified by:
loadFingerprintsin interfaceISVNPersistentAuthenticationProvider
-
saveFingerprints
public void saveFingerprints(java.lang.String realm, byte[] fingerprints)- Specified by:
saveFingerprintsin interfaceISVNPersistentAuthenticationProvider
-
-