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")) { 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)) {
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")) { 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)) {
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")) { 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)) {
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"); }