private void updateClientManager() { File configDir = myConfigDir == null ? null : new File(myConfigDir); myOptions = SVNWCUtil.createDefaultOptions(configDir, true); myAuthenticationManager = SVNWCUtil.createDefaultAuthenticationManager(configDir, myUserName, myPassword, myOptions.isAuthStorageEnabled()); if (myPrompt != null) { myAuthenticationManager.setAuthenticationProvider(new JavaHLAuthenticationProvider(myPrompt)); } else { myAuthenticationManager.setAuthenticationProvider(null); } myAuthenticationManager.setRuntimeStorage(ourAuthStorage); myClientManager = null; }
private static String getServerCertificateInfo(X509Certificate cert) { StringBuffer info = new StringBuffer(); info.append(" - Subject: "); info.append(cert.getSubjectDN().getName()); info.append('\n'); info.append(" - Valid: "); info.append("from " + cert.getNotBefore() + " until " + cert.getNotAfter()); info.append('\n'); info.append(" - Issuer: "); info.append(cert.getIssuerDN().getName()); info.append('\n'); info.append(" - Fingerprint: "); info.append(getFingerprint(cert)); return info.toString(); }
public int acceptServerAuthentication(SVNURL url, String realm, Object serverAuth, boolean resultMayBeStored) { if (serverAuth != null && myPrompt instanceof PromptUserPassword2) { PromptUserPassword2 sslPrompt = (PromptUserPassword2) myPrompt; serverAuth = serverAuth instanceof X509Certificate ? getServerCertificateInfo((X509Certificate) serverAuth) : serverAuth; if (serverAuth == null) { serverAuth = ""; } return sslPrompt.askTrustSSLServer(serverAuth.toString(), resultMayBeStored); } return ACCEPTED; }
public SVNAuthentication requestClientAuthentication(String kind, SVNURL url, String realm, SVNErrorMessage errorMessage, SVNAuthentication previousAuth, boolean authMayBeStored) { if (ISVNAuthenticationManager.SSH.equals(kind) && myPrompt instanceof PromptUserPasswordSSH) { PromptUserPasswordSSH prompt4 = (PromptUserPasswordSSH) myPrompt; String userName = previousAuth != null && previousAuth.getUserName() != null ? previousAuth.getUserName() : getUserName(null, url); int port = url != null ? url.getPort() : -1; if (prompt4.promptSSH(realm, userName, port, authMayBeStored)) { String keyPath = prompt4.getSSHPrivateKeyPath(); String passphrase = prompt4.getSSHPrivateKeyPassphrase(); userName = getUserName(prompt4.getUsername(), url); if ("".equals(passphrase)) { passphrase = null; String userName = getUserName(System.getProperty("svnkit.ssh2.username", System.getProperty("javasvn.ssh2.username")), url); String passPhrase = System.getProperty("svnkit.ssh2.passphrase", System.getProperty("javasvn.ssh2.passphrase")); if (userName == null) { String userName = previousAuth != null && previousAuth.getUserName() != null ? previousAuth.getUserName() : getUserName(null, url); if (myPrompt instanceof PromptUserPasswordUser) { PromptUserPasswordUser prompt3 = (PromptUserPasswordUser) myPrompt; return getDefaultUserNameCredentials(userName); } else if (myPrompt instanceof PromptUserPassword3) { PromptUserPassword3 prompt3 = (PromptUserPassword3) myPrompt; return getDefaultUserNameCredentials(userName); return getDefaultUserNameCredentials(userName); } else if(!ISVNAuthenticationManager.PASSWORD.equals(kind)){ return null;
public SVNAuthentication requestClientAuthentication(String kind, SVNURL url, String realm, SVNErrorMessage errorMessage, SVNAuthentication previousAuth, boolean authMayBeStored) { if (ISVNAuthenticationManager.SSH.equals(kind) && myPrompt instanceof PromptUserPasswordSSH) { PromptUserPasswordSSH prompt4 = (PromptUserPasswordSSH) myPrompt; String userName = previousAuth != null && previousAuth.getUserName() != null ? previousAuth.getUserName() : getUserName(null, url); int port = url != null ? url.getPort() : -1; if (prompt4.promptSSH(realm, userName, port, authMayBeStored)) { String keyPath = prompt4.getSSHPrivateKeyPath(); String passphrase = prompt4.getSSHPrivateKeyPassphrase(); userName = getUserName(prompt4.getUsername(), url); if ("".equals(passphrase)) { passphrase = null; String userName = getUserName(System.getProperty("svnkit.ssh2.username", System.getProperty("javasvn.ssh2.username")), url); String passPhrase = System.getProperty("svnkit.ssh2.passphrase", System.getProperty("javasvn.ssh2.passphrase")); if (userName == null) { String userName = previousAuth != null && previousAuth.getUserName() != null ? previousAuth.getUserName() : getUserName(null, url); if (myPrompt instanceof PromptUserPasswordUser) { PromptUserPasswordUser prompt3 = (PromptUserPasswordUser) myPrompt; return null; String userName = previousAuth != null && previousAuth.getUserName() != null ? previousAuth.getUserName() : getUserName(null, url); if (myPrompt instanceof PromptUserPassword3) { PromptUserPassword3 prompt3 = (PromptUserPassword3) myPrompt;
public SVNAuthentication requestClientAuthentication(String kind, SVNURL url, String realm, SVNErrorMessage errorMessage, SVNAuthentication previousAuth, boolean authMayBeStored) { if (ISVNAuthenticationManager.SSH.equals(kind) && myPrompt instanceof PromptUserPasswordSSH) { PromptUserPasswordSSH prompt4 = (PromptUserPasswordSSH) myPrompt; String userName = previousAuth != null && previousAuth.getUserName() != null ? previousAuth.getUserName() : getUserName(null, url); int port = url != null ? url.getPort() : -1; if (prompt4.promptSSH(realm, userName, port, authMayBeStored)) { String keyPath = prompt4.getSSHPrivateKeyPath(); String passphrase = prompt4.getSSHPrivateKeyPassphrase(); userName = getUserName(prompt4.getUsername(), url); if ("".equals(passphrase)) { passphrase = null; String userName = getUserName(System.getProperty("svnkit.ssh2.username", System.getProperty("javasvn.ssh2.username")), url); String passPhrase = System.getProperty("svnkit.ssh2.passphrase", System.getProperty("javasvn.ssh2.passphrase")); if (userName == null) { String userName = previousAuth != null && previousAuth.getUserName() != null ? previousAuth.getUserName() : getUserName(null, url); if (myPrompt instanceof PromptUserPasswordUser) { PromptUserPasswordUser prompt3 = (PromptUserPasswordUser) myPrompt; return getDefaultUserNameCredentials(userName); } else if (myPrompt instanceof PromptUserPassword3) { PromptUserPassword3 prompt3 = (PromptUserPassword3) myPrompt; return getDefaultUserNameCredentials(userName); return getDefaultUserNameCredentials(userName); } else if(!ISVNAuthenticationManager.PASSWORD.equals(kind)){ return null;
public SVNAuthentication requestClientAuthentication(String kind, SVNURL url, String realm, SVNErrorMessage errorMessage, SVNAuthentication previousAuth, boolean authMayBeStored) { if (ISVNAuthenticationManager.SSH.equals(kind) && myPrompt instanceof PromptUserPasswordSSH) { PromptUserPasswordSSH prompt4 = (PromptUserPasswordSSH) myPrompt; String userName = previousAuth != null && previousAuth.getUserName() != null ? previousAuth.getUserName() : getUserName(null, url); int port = url != null ? url.getPort() : -1; if (prompt4.promptSSH(realm, userName, port, authMayBeStored)) { String keyPath = prompt4.getSSHPrivateKeyPath(); String passphrase = prompt4.getSSHPrivateKeyPassphrase(); userName = getUserName(prompt4.getUsername(), url); if ("".equals(passphrase)) { passphrase = null; String userName = getUserName(System.getProperty("svnkit.ssh2.username", System.getProperty("javasvn.ssh2.username")), url); String passPhrase = System.getProperty("svnkit.ssh2.passphrase", System.getProperty("javasvn.ssh2.passphrase")); if (userName == null) { String userName = previousAuth != null && previousAuth.getUserName() != null ? previousAuth.getUserName() : getUserName(null, url); if (myPrompt instanceof PromptUserPasswordUser) { PromptUserPasswordUser prompt3 = (PromptUserPasswordUser) myPrompt; return getDefaultUserNameCredentials(userName); } else if (myPrompt instanceof PromptUserPassword3) { PromptUserPassword3 prompt3 = (PromptUserPassword3) myPrompt; return getDefaultUserNameCredentials(userName); return getDefaultUserNameCredentials(userName); } else if(!ISVNAuthenticationManager.PASSWORD.equals(kind)){ return null;
private void updateClientManager() { File configDir = myConfigDir == null ? null : new File(myConfigDir); myOptions = SVNWCUtil.createDefaultOptions(configDir, true); myOptions.setConflictHandler(getConflictHandler()); myAuthenticationManager = SVNWCUtil.createDefaultAuthenticationManager(configDir, myUserName, myPassword, myOptions.isAuthStorageEnabled()); if (myPrompt != null) { myAuthenticationManager.setAuthenticationProvider(new JavaHLAuthenticationProvider(myPrompt)); } else { myAuthenticationManager.setAuthenticationProvider(null); } if (myAuthenticationManager instanceof DefaultSVNAuthenticationManager) { ((DefaultSVNAuthenticationManager)myAuthenticationManager).setRuntimeStorage(getClientCredentialsStorage()); } if (myClientManager != null) { myClientManager.dispose(); myClientManager.setAuthenticationManager(myAuthenticationManager); myClientManager.setOptions(myOptions); } }
private void updateClientManager() { File configDir = myConfigDir == null ? null : new File(myConfigDir); myOptions = SVNWCUtil.createDefaultOptions(configDir, true); myOptions.setConflictHandler(getConflictHandler()); myAuthenticationManager = SVNWCUtil.createDefaultAuthenticationManager(configDir, myUserName, myPassword, myOptions.isAuthStorageEnabled()); if (myPrompt != null) { myAuthenticationManager.setAuthenticationProvider(new JavaHLAuthenticationProvider(myPrompt)); } else { myAuthenticationManager.setAuthenticationProvider(null); } if (myAuthenticationManager instanceof DefaultSVNAuthenticationManager) { ((DefaultSVNAuthenticationManager)myAuthenticationManager).setRuntimeStorage(getClientCredentialsStorage()); } if (myClientManager != null) { myClientManager.dispose(); myClientManager.setAuthenticationManager(myAuthenticationManager); myClientManager.setOptions(myOptions); } }
private void updateClientManager() { File configDir = myConfigDir == null ? null : new File(myConfigDir); myOptions = SVNWCUtil.createDefaultOptions(configDir, true); myOptions.setConflictHandler(getConflictHandler()); myAuthenticationManager = SVNWCUtil.createDefaultAuthenticationManager(configDir, myUserName, myPassword, myOptions.isAuthStorageEnabled()); if (myPrompt != null) { myAuthenticationManager.setAuthenticationProvider(new JavaHLAuthenticationProvider(myPrompt)); } else { myAuthenticationManager.setAuthenticationProvider(null); } if (myAuthenticationManager instanceof DefaultSVNAuthenticationManager) { ((DefaultSVNAuthenticationManager)myAuthenticationManager).setRuntimeStorage(getClientCredentialsStorage()); } if (myClientManager != null) { myClientManager.dispose(); myClientManager.setAuthenticationManager(myAuthenticationManager); myClientManager.setOptions(myOptions); } }