From d99df2edfe4c51d68e77ec32620cfdf5285b0264 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 22 Jun 2015 14:37:38 +0200 Subject: Check StatusCode returned by IdP; set proper content type in requests to IdP; clean up imports and compact catch blocks --- src/main/java/edu/kit/scc/dei/ecplean/ECPAuthenticatorBase.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/main/java/edu/kit/scc/dei/ecplean/ECPAuthenticatorBase.java') diff --git a/src/main/java/edu/kit/scc/dei/ecplean/ECPAuthenticatorBase.java b/src/main/java/edu/kit/scc/dei/ecplean/ECPAuthenticatorBase.java index 7e080f6..ff48afb 100644 --- a/src/main/java/edu/kit/scc/dei/ecplean/ECPAuthenticatorBase.java +++ b/src/main/java/edu/kit/scc/dei/ecplean/ECPAuthenticatorBase.java @@ -77,6 +77,9 @@ public abstract class ECPAuthenticatorBase extends Observable { try { httpPost.setEntity(new StringEntity(documentToString(idpRequest))); + httpPost.setHeader("Accept", "text/html; application/vnd.paos+xml"); + httpPost.setHeader("PAOS", "ver='urn:liberty:paos:2003-08';'urn:oasis:names:tc:SAML:2.0:profiles:SSO:ecp'"); + httpPost.setHeader("Content-Type", "application/vnd.paos+xml"); httpResponse = client.execute(httpPost); if (httpResponse.getStatusLine().getStatusCode() == HttpStatus.SC_UNAUTHORIZED) { -- cgit v1.2.3-55-g7522