AuthenticationData (final String kind, final Url url, final String realm, final boolean canCache) { final MyCallState callState = new MyCallState(true, false); myCallState.set(callState); // once we came here, we don't know _correct_ auth todo +- myVcs.getSvnConfiguration().clearCredentials(kind, realm); final AuthenticationData[] result = new AuthenticationData[1]; Runnable command = null; final boolean authCredsOn = canCache && myManager.getHostOptions(url).isAuthStorageEnabled(); final String userName = myManager.getDefaultUsername(); if (SvnAuthenticationManager.PASSWORD.equals(kind)) { command = () -> { SimpleCredentialsDialog dialog = new SimpleCredentialsDialog(myProject); dialog.setup(realm, userName, authCredsOn); dialog.setTitle(message("dialog.title.authentication.required")); if (dialog.showAndGet()) { result[0] = new PasswordAuthenticationData(dialog.getUserName(), dialog.getPassword(), dialog.isSaveAllowed()); } }; } else if (SvnAuthenticationManager.SSL.equals(kind)) { command = () -> { SvnAuthenticationManager.HostOptions options = myManager.getHostOptions(url); final String file = options.getSSLClientCertFile(); final SSLCredentialsDialog dialog = new SSLCredentialsDialog(myProject, realm, authCredsOn); if (!StringUtil.isEmptyOrSpaces(file)) { dialog.setFile(file); } dialog.setTitle(message("dialog.title.authentication.required")); if (dialog.showAndGet()) { result[0] = new CertificateAuthenticationData(dialog.getCertificatePath(), dialog.getCertificatePassword(), dialog.getSaveAuth()); } }; } if (command != null) { showAndWait(command); LOG.debug("3 authentication result: " + result[0]); } final boolean wasCanceled = result[0] == null; callState.setWasCancelled(wasCanceled); return result[0]; }