Package org.tmatesoft.svn.core.javahl17
Class JavaHLAuthenticationProvider
- java.lang.Object
-
- org.tmatesoft.svn.core.javahl17.JavaHLAuthenticationProvider
-
- All Implemented Interfaces:
ISVNAuthenticationProvider,ISVNSSLPasspharsePromptSupport
class JavaHLAuthenticationProvider extends java.lang.Object implements ISVNAuthenticationProvider, ISVNSSLPasspharsePromptSupport
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.StringADAPTER_DEFAULT_PROMPT_CLASSprivate UserPasswordCallbackprompt-
Fields inherited from interface org.tmatesoft.svn.core.auth.ISVNAuthenticationProvider
ACCEPTED, ACCEPTED_TEMPORARY, REJECTED
-
-
Constructor Summary
Constructors Constructor Description JavaHLAuthenticationProvider(UserPasswordCallback prompt)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intacceptServerAuthentication(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 SVNAuthenticationgetDefaultUserNameCredentials(java.lang.String userName)private static java.lang.StringgetUserName(java.lang.String userName, SVNURL url)booleanisSSLPassphrasePromtSupported()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.
-
-
-
Field Detail
-
ADAPTER_DEFAULT_PROMPT_CLASS
private static final java.lang.String ADAPTER_DEFAULT_PROMPT_CLASS
- See Also:
- Constant Field Values
-
prompt
private UserPasswordCallback prompt
-
-
Constructor Detail
-
JavaHLAuthenticationProvider
public JavaHLAuthenticationProvider(UserPasswordCallback prompt)
-
-
Method Detail
-
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
-
getDefaultUserNameCredentials
private SVNAuthentication getDefaultUserNameCredentials(java.lang.String userName)
-
acceptServerAuthentication
public int acceptServerAuthentication(SVNURL url, java.lang.String realm, 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 accessedrealm- 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)
-
isSSLPassphrasePromtSupported
public boolean isSSLPassphrasePromtSupported()
- Specified by:
isSSLPassphrasePromtSupportedin interfaceISVNSSLPasspharsePromptSupport
-
getUserName
private static java.lang.String getUserName(java.lang.String userName, SVNURL url)
-
-