public SvnAuthenticationManager getPassiveAuthenticationManager(Project project) {
    if (myPassiveAuthManager == null) {
      myPassiveAuthManager =
          new SvnAuthenticationManager(project, 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;
  }
 public SvnAuthenticationManager getInteractiveManager(final SvnVcs svnVcs) {
   if (myInteractiveManager == null) {
     myInteractiveManager =
         new SvnAuthenticationManager(svnVcs.getProject(), new File(getConfigurationDirectory()));
     myInteractiveManager.setRuntimeStorage(RUNTIME_AUTH_CACHE);
     myInteractiveProvider =
         new SvnInteractiveAuthenticationProvider(svnVcs, myInteractiveManager);
     myInteractiveManager.setAuthenticationProvider(myInteractiveProvider);
   }
   return myInteractiveManager;
 }
  public static SvnAuthenticationManager createForTmpDir(
      final Project project,
      final File dir,
      @Nullable final SvnInteractiveAuthenticationProvider provider) {
    final SvnVcs vcs = SvnVcs.getInstance(project);

    final SvnAuthenticationManager interactive = new SvnAuthenticationManager(project, dir);
    interactive.setRuntimeStorage(RUNTIME_AUTH_CACHE);
    final SvnInteractiveAuthenticationProvider interactiveProvider =
        provider == null ? new SvnInteractiveAuthenticationProvider(vcs, interactive) : provider;
    interactive.setAuthenticationProvider(interactiveProvider);

    return interactive;
  }
 public SvnAuthenticationManager getAuthenticationManager(final SvnVcs svnVcs) {
   if (myAuthManager == null) {
     // reloaded when configuration directory changes
     myAuthManager =
         new SvnAuthenticationManager(svnVcs.getProject(), new File(getConfigurationDirectory()));
     Disposer.register(
         svnVcs.getProject(),
         new Disposable() {
           @Override
           public void dispose() {
             myAuthManager = null;
           }
         });
     getInteractiveManager(svnVcs);
     // to init
     myAuthManager.setAuthenticationProvider(
         new SvnAuthenticationProvider(svnVcs, myInteractiveProvider, RUNTIME_AUTH_CACHE));
     myAuthManager.setRuntimeStorage(RUNTIME_AUTH_CACHE);
   }
   return myAuthManager;
 }