class JavaHLAuthenticationProvider extends java.lang.Object implements ISVNAuthenticationProvider, ISVNSSLPasspharsePromptSupport
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
ADAPTER_DEFAULT_PROMPT_CLASS |
private PromptUserPassword |
myPrompt |
ACCEPTED, ACCEPTED_TEMPORARY, REJECTED
Constructor and Description |
---|
JavaHLAuthenticationProvider(PromptUserPassword prompt) |
Modifier and Type | Method and Description |
---|---|
int |
acceptServerAuthentication(SVNURL url,
java.lang.String realm,
java.lang.Object serverAuth,
boolean resultMayBeStored)
Checks a server authentication certificate and whether accepts it
(if the client trusts it) or not.
|
private SVNAuthentication |
getDefaultUserNameCredentials(java.lang.String userName) |
private static java.lang.String |
getUserName(java.lang.String userName,
SVNURL url) |
boolean |
isSSLPassphrasePromtSupported() |
SVNAuthentication |
requestClientAuthentication(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.
|
private static final java.lang.String ADAPTER_DEFAULT_PROMPT_CLASS
private PromptUserPassword myPrompt
public JavaHLAuthenticationProvider(PromptUserPassword prompt)
public SVNAuthentication requestClientAuthentication(java.lang.String kind, SVNURL url, java.lang.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 anywayprivate SVNAuthentication getDefaultUserNameCredentials(java.lang.String userName)
public int acceptServerAuthentication(SVNURL url, java.lang.String realm, java.lang.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 accessedrealm
- 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 boolean isSSLPassphrasePromtSupported()
isSSLPassphrasePromtSupported
in interface ISVNSSLPasspharsePromptSupport
private static java.lang.String getUserName(java.lang.String userName, SVNURL url)