public class DefaultSVNPersistentAuthenticationProvider extends Object implements ISVNAuthenticationProvider, ISVNPersistentAuthenticationProvider
Modifier and Type | Class and Description |
---|---|
protected class |
DefaultSVNPersistentAuthenticationProvider.GnomeKeyringPasswordStorage |
static interface |
DefaultSVNPersistentAuthenticationProvider.IPasswordStorage |
protected class |
DefaultSVNPersistentAuthenticationProvider.MacOsKeychainPasswordStorage |
protected class |
DefaultSVNPersistentAuthenticationProvider.SimplePasswordStorage |
protected class |
DefaultSVNPersistentAuthenticationProvider.WinCryptPasswordStorage |
Modifier and Type | Field and Description |
---|---|
static String |
GNOME_KEYRING_PASSTYPE |
static String |
GNOME_KEYRING_PASSWORD_STORAGE |
static String |
MAC_OS_KEYCHAIN_PASSTYPE |
static String |
MAC_OS_KEYCHAIN_PASSWORD_STORAGE |
static String |
SIMPLE_PASSTYPE |
static String |
WIN_CRYPT_PASSTYPE |
static String |
WINDOWS_CRYPTO_API_PASSWORD_STORAGE |
ACCEPTED, ACCEPTED_TEMPORARY, REJECTED
Modifier | Constructor and Description |
---|---|
protected |
DefaultSVNPersistentAuthenticationProvider(File directory,
String userName,
ISVNAuthenticationStorageOptions authOptions,
DefaultSVNOptions defaultOptions,
ISVNHostOptionsProvider hostOptionsProvider) |
Modifier and Type | Method and Description |
---|---|
int |
acceptServerAuthentication(SVNURL url,
String r,
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 String |
getAuthFileName(String realm) |
boolean |
isMSCapi(String filepath) |
byte[] |
loadFingerprints(String realm) |
protected String |
preprocessRealm(String realm) |
SVNAuthentication |
requestClientAuthentication(String kind,
SVNURL url,
String realm,
SVNErrorMessage errorMessage,
SVNAuthentication previousAuth,
boolean authMayBeStored)
Returns a next user credential of the specified kind for the given
authentication realm.
|
void |
saveAuthentication(SVNAuthentication auth,
String kind,
String realm) |
void |
saveFingerprints(String realm,
byte[] fingerprints) |
public static final String WINDOWS_CRYPTO_API_PASSWORD_STORAGE
public static final String MAC_OS_KEYCHAIN_PASSWORD_STORAGE
public static final String GNOME_KEYRING_PASSWORD_STORAGE
public static final String SIMPLE_PASSTYPE
public static final String WIN_CRYPT_PASSTYPE
public static final String MAC_OS_KEYCHAIN_PASSTYPE
public static final String GNOME_KEYRING_PASSTYPE
protected DefaultSVNPersistentAuthenticationProvider(File directory, String userName, ISVNAuthenticationStorageOptions authOptions, DefaultSVNOptions defaultOptions, ISVNHostOptionsProvider hostOptionsProvider)
protected DefaultSVNPersistentAuthenticationProvider.IPasswordStorage[] createPasswordStorages(DefaultSVNOptions options)
public SVNAuthentication requestClientAuthentication(String kind, SVNURL url, String realm, SVNErrorMessage errorMessage, SVNAuthentication previousAuth, boolean authMayBeStored)
ISVNAuthenticationProvider
If this provider has got more than one credentials (say, a list of credentials),
to get the first one of them previousAuth
is set to
null.
requestClientAuthentication
in interface ISVNAuthenticationProvider
kind
- a credential kind (for example, like those defined in
ISVNAuthenticationManager
)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 anywaypublic boolean isMSCapi(String filepath)
public void saveAuthentication(SVNAuthentication auth, String kind, String realm) throws SVNException
saveAuthentication
in interface ISVNPersistentAuthenticationProvider
SVNException
public int acceptServerAuthentication(SVNURL url, String r, Object serverAuth, boolean resultMayBeStored)
ISVNAuthenticationProvider
This method is used by an SSL manager (see DefaultSVNSSLTrustManager
).
acceptServerAuthentication
in interface ISVNAuthenticationProvider
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 notISVNAuthenticationProvider.REJECTED
, ISVNAuthenticationProvider.ACCEPTED_TEMPORARY
, or ISVNAuthenticationProvider.ACCEPTED
)public byte[] loadFingerprints(String realm)
loadFingerprints
in interface ISVNPersistentAuthenticationProvider
public void saveFingerprints(String realm, byte[] fingerprints)
saveFingerprints
in interface ISVNPersistentAuthenticationProvider
Copyright © 2018. All rights reserved.