]> WPIA git - gigi.git/blobdiff - tests/org/cacert/gigi/LoginTest.java
Pullup "login" to managed test
[gigi.git] / tests / org / cacert / gigi / LoginTest.java
index 9aa24c763c5de083eaf18ae48ede7620f15fc6c5..729a5988e8053f4f4cf4e3b26828acec9b801a63 100644 (file)
@@ -35,18 +35,5 @@ public class LoginTest extends ManagedTest {
                huc.addRequestProperty("Cookie", cookie);
                return huc.getResponseCode() == 200;
        }
-       public String login(String email, String pw) throws IOException {
-               URL u = new URL("https://" + getServerName() + "/login");
-               HttpURLConnection huc = (HttpURLConnection) u.openConnection();
-               huc.setDoOutput(true);
-               OutputStream os = huc.getOutputStream();
-               String data = "username=" + URLEncoder.encode(email, "UTF-8")
-                               + "&password=" + URLEncoder.encode(pw, "UTF-8");
-               os.write(data.getBytes());
-               os.flush();
-               String headerField = huc.getHeaderField("Set-Cookie");
-               headerField = headerField.substring(0, headerField.indexOf(';'));
-               return headerField;
-       }
 
 }