uc.addRequestProperty("Cookie", headerField);
uc.setDoOutput(true);
uc.getOutputStream().write((param + "&csrf=" + csrf).getBytes("UTF-8"));
uc.addRequestProperty("Cookie", headerField);
uc.setDoOutput(true);
uc.getOutputStream().write((param + "&csrf=" + csrf).getBytes("UTF-8"));
return stripCookie(headerField);
}
public static String login(final PrivateKey pk, final X509Certificate ce) throws NoSuchAlgorithmException, KeyManagementException, IOException, MalformedURLException {
return stripCookie(headerField);
}
public static String login(final PrivateKey pk, final X509Certificate ce) throws NoSuchAlgorithmException, KeyManagementException, IOException, MalformedURLException {
authenticateClientCert(pk, ce, connection);
if (connection.getResponseCode() == 302) {
authenticateClientCert(pk, ce, connection);
if (connection.getResponseCode() == 302) {
- assertEquals("https://" + getServerName().replaceFirst("^www.", "secure.").replaceFirst(":443$", "") + "/", connection.getHeaderField("Location").replaceFirst(":443$", ""));
+ assertEquals("https://" + getSecureServerName() + "/", connection.getHeaderField("Location").replaceFirst(":443$", ""));