private SVNAuthenticator createSASLAuthenticator() throws SVNException { try { Class saslClass = SVNConnection.class.getClassLoader().loadClass("org.tmatesoft.svn.core.internal.io.svn.sasl.SVNSaslAuthenticator"); if (saslClass != null) { Constructor constructor = saslClass.getConstructor(new Class[] {SVNConnection.class}); if (constructor != null) { return (SVNAuthenticator) constructor.newInstance(new Object[] {this}); } } } catch (Throwable th) { SVNDebugLog.getDefaultLog().logFine(SVNLogType.NETWORK, th.getMessage()); } return new SVNPlainAuthenticator(this); }
protected SVNErrorMessage readAuthResponse() throws SVNException { List items = getConnection().readTuple("w(?s)", true); if (SVNAuthenticator.SUCCESS.equals(SVNReader.getString(items, 0))) { return null; } else if (SVNAuthenticator.FAILURE.equals(SVNReader.getString(items, 0))) { return SVNErrorMessage.create(SVNErrorCode.RA_NOT_AUTHORIZED, "Authentication error from server: {0}", SVNReader.getString(items, 1)); } return SVNErrorMessage.create(SVNErrorCode.RA_NOT_AUTHORIZED, "Unexpected server response to authentication"); }
SVNPasswordAuthentication auth = null; if (repos.getExternalUserName() != null && mechs.contains("EXTERNAL")) { getConnection().write("(w(s))", new Object[]{"EXTERNAL", ""}); failureReason = readAuthResponse(); } else if (mechs.contains("ANONYMOUS")) { getConnection().write("(w(s))", new Object[]{"ANONYMOUS", ""}); failureReason = readAuthResponse(); } else if (mechs.contains("CRAM-MD5")) { while (true) { if (e.getErrorMessage().getErrorCode() == SVNErrorCode.CANCELLED) { throw e; } else if (getLastError() != null) { SVNErrorManager.error(getLastError(), SVNLogType.NETWORK); setLastError(failureReason); break; getConnection().write("(w())", new Object[]{"CRAM-MD5"}); while (true) { authenticator.setUserCredentials(auth); List items = getConnection().readTuple("w(?s)", true); String status = SVNReader.getString(items, 0); if (SVNAuthenticator.SUCCESS.equals(status)) { String message = SVNReader.getString(items, 1); if (message != null) { setLastError(SVNErrorMessage.create(SVNErrorCode.RA_NOT_AUTHORIZED, message));
while(true) { if (myClient == null) { new SVNPlainAuthenticator(getConnection()).authenticate(mechs, realm, repository); return;
SVNPasswordAuthentication auth = null; if (repos.getExternalUserName() != null && mechs.contains("EXTERNAL")) { getConnection().write("(w(s))", new Object[]{"EXTERNAL", ""}); failureReason = readAuthResponse(); } else if (mechs.contains("ANONYMOUS")) { getConnection().write("(w(s))", new Object[]{"ANONYMOUS", ""}); failureReason = readAuthResponse(); } else if (mechs.contains("CRAM-MD5")) { while (true) { if (e.getErrorMessage().getErrorCode() == SVNErrorCode.CANCELLED) { throw e; } else if (getLastError() != null) { SVNErrorManager.error(getLastError(), SVNLogType.NETWORK); setLastError(failureReason); break; getConnection().write("(w())", new Object[]{"CRAM-MD5"}); while (true) { authenticator.setUserCredentials(auth); List items = getConnection().readTuple("w(?s)", true); String status = SVNReader.getString(items, 0); if (SVNAuthenticator.SUCCESS.equals(status)) { String message = SVNReader.getString(items, 1); if (message != null) { setLastError(SVNErrorMessage.create(SVNErrorCode.RA_NOT_AUTHORIZED, message));
while(true) { if (myClient == null) { new SVNPlainAuthenticator(getConnection()).authenticate(mechs, realm, repository); return;
SVNPasswordAuthentication auth = null; if (repos.getExternalUserName() != null && mechs.contains("EXTERNAL")) { getConnection().write("(w(s))", new Object[]{"EXTERNAL", ""}); failureReason = readAuthResponse(); } else if (mechs.contains("ANONYMOUS")) { getConnection().write("(w(s))", new Object[]{"ANONYMOUS", ""}); failureReason = readAuthResponse(); } else if (mechs.contains("CRAM-MD5")) { while (true) { if (e.getErrorMessage().getErrorCode() == SVNErrorCode.CANCELLED) { throw e; } else if (getLastError() != null) { SVNErrorManager.error(getLastError(), SVNLogType.NETWORK); setLastError(failureReason); break; getConnection().write("(w())", new Object[]{"CRAM-MD5"}); while (true) { authenticator.setUserCredentials(auth); List items = getConnection().readTuple("w(?s)", true); String status = SVNReader.getString(items, 0); if (SVNAuthenticator.SUCCESS.equals(status)) { String message = SVNReader.getString(items, 1); if (message != null) { setLastError(SVNErrorMessage.create(SVNErrorCode.RA_NOT_AUTHORIZED, message));
while(true) { if (myClient == null) { new SVNPlainAuthenticator(getConnection()).authenticate(mechs, realm, repository); return;
private SVNAuthenticator createSASLAuthenticator() throws SVNException { try { Class saslClass = SVNConnection.class.getClassLoader().loadClass("org.tmatesoft.svn.core.internal.io.svn.sasl.SVNSaslAuthenticator"); if (saslClass != null) { Constructor constructor = saslClass.getConstructor(new Class[] {SVNConnection.class}); if (constructor != null) { return (SVNAuthenticator) constructor.newInstance(new Object[] {this}); } } } catch (Throwable th) { SVNDebugLog.getDefaultLog().logFine(SVNLogType.NETWORK, th.getMessage()); } return new SVNPlainAuthenticator(this); }
protected SVNErrorMessage readAuthResponse() throws SVNException { List items = getConnection().readTuple("w(?s)", true); if (SVNAuthenticator.SUCCESS.equals(SVNReader.getString(items, 0))) { return null; } else if (SVNAuthenticator.FAILURE.equals(SVNReader.getString(items, 0))) { return SVNErrorMessage.create(SVNErrorCode.RA_NOT_AUTHORIZED, "Authentication error from server: {0}", SVNReader.getString(items, 1)); } return SVNErrorMessage.create(SVNErrorCode.RA_NOT_AUTHORIZED, "Unexpected server response to authentication"); }
while(true) { if (myClient == null) { return new SVNPlainAuthenticator(getConnection()).authenticate(mechs, realm, repository);
protected SVNErrorMessage readAuthResponse() throws SVNException { List items = getConnection().readTuple("w(?s)", true); if (SVNAuthenticator.SUCCESS.equals(SVNReader.getString(items, 0))) { return null; } else if (SVNAuthenticator.FAILURE.equals(SVNReader.getString(items, 0))) { return SVNErrorMessage.create(SVNErrorCode.RA_NOT_AUTHORIZED, "Authentication error from server: {0}", SVNReader.getString(items, 1)); } return SVNErrorMessage.create(SVNErrorCode.RA_NOT_AUTHORIZED, "Unexpected server response to authentication"); }