public class SVNConsoleAuthenticationProvider extends Object implements ISVNAuthenticationProvider, ISVNSSLPasspharsePromptSupport, ISVNAuthStoreHandler, ISVNGnomeKeyringPasswordProvider
ACCEPTED, ACCEPTED_TEMPORARY, REJECTED
Constructor and Description |
---|
SVNConsoleAuthenticationProvider(boolean trustServerCertificate) |
SVNConsoleAuthenticationProvider(EnumSet<SVNCertificateFailureKind> trustServerCertificateFailureKinds) |
Modifier and Type | Method and Description |
---|---|
int |
acceptServerAuthentication(SVNURL url,
String realm,
Object certificate,
boolean resultMayBeStored)
Checks a server authentication certificate and whether accepts it
(if the client trusts it) or not.
|
boolean |
canStorePlainTextPassphrases(String realm,
SVNAuthentication auth) |
boolean |
canStorePlainTextPasswords(String realm,
SVNAuthentication auth) |
char[] |
getKeyringPassword(String keyringName) |
boolean |
isSSLPassphrasePromtSupported() |
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.
|
public SVNConsoleAuthenticationProvider(EnumSet<SVNCertificateFailureKind> trustServerCertificateFailureKinds)
public SVNConsoleAuthenticationProvider(boolean trustServerCertificate)
public int acceptServerAuthentication(SVNURL url, String realm, Object certificate, boolean resultMayBeStored)
ISVNAuthenticationProvider
This method is used by an SSL manager (see DefaultSVNSSLTrustManager
).
acceptServerAuthentication
in interface ISVNAuthenticationProvider
url
- a repository location that is accessedrealm
- a repository authentication realm (host, port, realm string)certificate
- a server certificate objectresultMayBeStored
- if true then the server certificate
can be cached, otherwise notISVNAuthenticationProvider.REJECTED
, ISVNAuthenticationProvider.ACCEPTED_TEMPORARY
, or ISVNAuthenticationProvider.ACCEPTED
)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 canStorePlainTextPasswords(String realm, SVNAuthentication auth) throws SVNException
canStorePlainTextPasswords
in interface ISVNAuthStoreHandler
SVNException
public boolean canStorePlainTextPassphrases(String realm, SVNAuthentication auth) throws SVNException
canStorePlainTextPassphrases
in interface ISVNAuthStoreHandler
SVNException
public boolean isSSLPassphrasePromtSupported()
isSSLPassphrasePromtSupported
in interface ISVNSSLPasspharsePromptSupport
public char[] getKeyringPassword(String keyringName) throws SVNException
getKeyringPassword
in interface ISVNGnomeKeyringPasswordProvider
SVNException
Copyright © 2024. All rights reserved.