Commit 52a4b880 authored by Brian Major's avatar Brian Major
Browse files

s1729 - post params in body, not url

parent e0b7c5e3
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -149,13 +149,14 @@ public class CadcBasicAuthenticator extends RealmBase
            URL loginURL = registryClient.getServiceURL(
                new URI(AC_URI), "http", "/login");

            loginURL = new URL(
                loginURL.toString() +
                "?userid=" + username + "&password=" + credentials);
            String post = "userid=" + username + "&password=" + credentials;

            HttpURLConnection conn = (HttpURLConnection) loginURL.openConnection();
            conn.setRequestMethod("POST");
            conn.setDoOutput(true);
            conn.connect();

            byte[] postData = post.getBytes("UTF-8");
            conn.getOutputStream().write(postData);

            int responseCode = conn.getResponseCode();