Class JavaHLAuthenticationProvider

java.lang.Object
org.tmatesoft.svn.core.javahl.JavaHLAuthenticationProvider
All Implemented Interfaces:
ISVNAuthenticationProvider, ISVNSSLPasspharsePromptSupport

class JavaHLAuthenticationProvider extends java.lang.Object implements ISVNAuthenticationProvider, ISVNSSLPasspharsePromptSupport
Version:
1.3
  • Field Details

  • Constructor Details

    • JavaHLAuthenticationProvider

      public JavaHLAuthenticationProvider(PromptUserPassword prompt)
  • Method Details

    • requestClientAuthentication

      public SVNAuthentication requestClientAuthentication(java.lang.String kind, SVNURL url, java.lang.String realm, SVNErrorMessage errorMessage, SVNAuthentication previousAuth, boolean authMayBeStored)
      Description copied from interface: ISVNAuthenticationProvider
      Returns 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 previousAuth is set to null.

      Specified by:
      requestClientAuthentication in interface ISVNAuthenticationProvider
      Parameters:
      kind - a credential kind (for example, like those defined in ISVNAuthenticationManager)
      url - a repository location that is to be accessed
      realm - a repository authentication realm (host, port, realm string)
      errorMessage - the recent authentication failure error message
      previousAuth - 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: ISVNAuthenticationProvider
      Checks 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:
      acceptServerAuthentication in interface ISVNAuthenticationProvider
      Parameters:
      url - a repository location that is accessed
      realm - a repository authentication realm (host, port, realm string)
      serverAuth - a server certificate object
      resultMayBeStored - if true then the server certificate can be cached, otherwise not
      Returns:
      the result of the certificate check (ISVNAuthenticationProvider.REJECTED, ISVNAuthenticationProvider.ACCEPTED_TEMPORARY, or ISVNAuthenticationProvider.ACCEPTED)
    • isSSLPassphrasePromtSupported

      public boolean isSSLPassphrasePromtSupported()
      Specified by:
      isSSLPassphrasePromtSupported in interface ISVNSSLPasspharsePromptSupport
    • getUserName

      private static java.lang.String getUserName(java.lang.String userName, SVNURL url)