Interface ISVNAuthenticationProvider

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int ACCEPTED
      Denotes that a user credential is accepted by a server and will be cached on the disk.
      static int ACCEPTED_TEMPORARY
      Denotes that a user credential is accepted by a server and will be cached only during runtime, not on the disk.
      static int REJECTED
      Denotes that a user credential is rejected by a server.
    • Field Detail

      • REJECTED

        static final int REJECTED
        Denotes that a user credential is rejected by a server.
        See Also:
        Constant Field Values
      • ACCEPTED_TEMPORARY

        static final int ACCEPTED_TEMPORARY
        Denotes that a user credential is accepted by a server and will be cached only during runtime, not on the disk.
        See Also:
        Constant Field Values
      • ACCEPTED

        static final int ACCEPTED
        Denotes that a user credential is accepted by a server and will be cached on the disk.
        See Also:
        Constant Field Values
    • Method Detail

      • requestClientAuthentication

        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.

        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.

        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
      • acceptServerAuthentication

        int acceptServerAuthentication​(SVNURL url,
                                       java.lang.String realm,
                                       java.lang.Object certificate,
                                       boolean resultMayBeStored)
        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).

        Parameters:
        url - a repository location that is accessed
        realm - a repository authentication realm (host, port, realm string)
        certificate - a server certificate object
        resultMayBeStored - if true then the server certificate can be cached, otherwise not
        Returns:
        the result of the certificate check (REJECTED, ACCEPTED_TEMPORARY, or ACCEPTED)