Class DefaultSVNAuthenticationManager

    • Method Detail

      • setInMemoryServersOptions

        public void setInMemoryServersOptions​(java.util.Map serversOptions)
      • setInMemoryConfigOptions

        public void setInMemoryConfigOptions​(java.util.Map configOptions)
      • getConfigDirectory

        protected java.io.File getConfigDirectory()
      • getAuthTypes

        public java.util.Collection<java.lang.String> getAuthTypes​(SVNURL url)
      • getProxyManager

        public ISVNProxyManager getProxyManager​(SVNURL url)
                                         throws SVNException
        Description copied from interface: ISVNAuthenticationManager
        Returns a proxy manager that keeps settings for that proxy server over which HTTP requests are send to a repository server.

        A default auth manager uses proxy settings from the standard servers file.

        Specified by:
        getProxyManager in interface ISVNAuthenticationManager
        Parameters:
        url - a repository location that will be accessed over the proxy server for which a manager is needed
        Returns:
        a proxy manager
        Throws:
        SVNException
      • getTrustManager

        public javax.net.ssl.TrustManager getTrustManager​(SVNURL url)
                                                   throws SVNException
        Description copied from interface: ISVNAuthenticationManager
        Returns a manager which handles trust data for the specified url.

        Note: in pre-1.2.0 versions ISVNAuthenticationManager used to provide ISVNSSLManager via a method getSSLManager() which is now replaced by this one. ISVNSSLManager is no longer used (replaced by TrustManager).

        Specified by:
        getTrustManager in interface ISVNAuthenticationManager
        Parameters:
        url - repository url
        Returns:
        trust manager
        Throws:
        SVNException
      • setDismissSensitiveDataUponUse

        public void setDismissSensitiveDataUponUse​(boolean dismiss)
        Control whether to dismiss credentials sensitive data once credentials object has been used. Default is not to dismiss.
        Parameters:
        dismiss - whether to dismiss data.
        Since:
        1.8.9
      • isDismissSensitiveDataUponUse

        public boolean isDismissSensitiveDataUponUse()
        Returns whether this authenticaiton manager dismiss sensitive data once credentials object has been used. Default is not to dismiss.
        Returns:
        Since:
        1.8.9
      • hasExplicitCredentials

        private boolean hasExplicitCredentials​(java.lang.String kind)
      • setRuntimeStorage

        public void setRuntimeStorage​(ISVNAuthenticationStorage storage)
        Sets a specific runtime authentication storage manager. This storage manager will be asked by this auth manager for cached credentials as well as used to cache new ones accepted recently.
        Parameters:
        storage - a custom auth storage manager
      • createDefaultAuthenticationProvider

        protected ISVNAuthenticationProvider createDefaultAuthenticationProvider​(java.lang.String userName,
                                                                                 char[] password,
                                                                                 java.io.File privateKey,
                                                                                 char[] passphrase,
                                                                                 boolean allowSave)
      • createCacheAuthenticationProvider

        protected ISVNAuthenticationProvider createCacheAuthenticationProvider​(java.io.File authDir,
                                                                               java.lang.String userName)
      • isAuthenticationForced

        public boolean isAuthenticationForced()
        Description copied from interface: ISVNAuthenticationManager
        Checks whether client should send authentication credentials to a repository server not waiting for the server's challenge.

        In some cases it may be necessary to send credentials beforehand, not waiting until the server asks to do it itself. To achieve such behaviour an implementor should return true from this routine.

        Specified by:
        isAuthenticationForced in interface ISVNAuthenticationManager
        Returns:
        true if authentication credentials are forced to be sent;false when credentials are to be sent only in response to a server challenge
      • setAuthenticationForced

        public void setAuthenticationForced​(boolean forced)
        Specifies the way how credentials are to be supplied to a repository server.
        Parameters:
        forced - true to force credentials sending; false to put off sending credentials till a server challenge
        See Also:
        isAuthenticationForced()
      • getReadTimeout

        public int getReadTimeout​(SVNRepository repository)
        Description copied from interface: ISVNAuthenticationManager
        Returns the read timeout value in milliseconds which repository should use in socket read operations. Socket read operations will block only for this amount of time.
        Specified by:
        getReadTimeout in interface ISVNAuthenticationManager
        Parameters:
        repository - a repository access driver
        Returns:
        connection timeout value
      • getConnectTimeout

        public int getConnectTimeout​(SVNRepository repository)
        Description copied from interface: ISVNAuthenticationManager
        Returns the connection timeout value in milliseconds which repository should use in network connection operations.
        Specified by:
        getConnectTimeout in interface ISVNAuthenticationManager
        Parameters:
        repository - repository access object
        Returns:
        connection timeout value in milliseconds which will be set to a socket
      • equals

        private static boolean equals​(byte[] b1,
                                      byte[] b2)
      • dismissSensitiveData

        public void dismissSensitiveData()
        Dismiss cached sensitive data (e.g. password) Calling this method clears explicit and cached credentials stored in this authentication manager.
        Since:
        1.8.9