Search in sources :

Example 1 with ISVNAuthenticationProvider

use of org.tmatesoft.svn.core.auth.ISVNAuthenticationProvider in project intellij-community by JetBrains.

the class SvnConfiguration method getPassiveAuthenticationManager.

public SvnAuthenticationManager getPassiveAuthenticationManager(@NotNull SvnVcs svnVcs) {
    if (myPassiveAuthManager == null) {
        myPassiveAuthManager = new SvnAuthenticationManager(svnVcs, new File(getConfigurationDirectory()));
        myPassiveAuthManager.setAuthenticationProvider(new ISVNAuthenticationProvider() {

            @Override
            public SVNAuthentication requestClientAuthentication(String kind, SVNURL url, String realm, SVNErrorMessage errorMessage, SVNAuthentication previousAuth, boolean authMayBeStored) {
                return null;
            }

            @Override
            public int acceptServerAuthentication(SVNURL url, String realm, Object certificate, boolean resultMayBeStored) {
                return REJECTED;
            }
        });
        myPassiveAuthManager.setRuntimeStorage(RUNTIME_AUTH_CACHE);
    }
    return myPassiveAuthManager;
}
Also used : SvnAuthenticationManager(org.jetbrains.idea.svn.auth.SvnAuthenticationManager) SVNURL(org.tmatesoft.svn.core.SVNURL) SVNConfigFile(org.tmatesoft.svn.core.internal.wc.SVNConfigFile) File(java.io.File) ISVNAuthenticationProvider(org.tmatesoft.svn.core.auth.ISVNAuthenticationProvider) SVNErrorMessage(org.tmatesoft.svn.core.SVNErrorMessage) SVNAuthentication(org.tmatesoft.svn.core.auth.SVNAuthentication)

Aggregations

File (java.io.File)1 SvnAuthenticationManager (org.jetbrains.idea.svn.auth.SvnAuthenticationManager)1 SVNErrorMessage (org.tmatesoft.svn.core.SVNErrorMessage)1 SVNURL (org.tmatesoft.svn.core.SVNURL)1 ISVNAuthenticationProvider (org.tmatesoft.svn.core.auth.ISVNAuthenticationProvider)1 SVNAuthentication (org.tmatesoft.svn.core.auth.SVNAuthentication)1 SVNConfigFile (org.tmatesoft.svn.core.internal.wc.SVNConfigFile)1