changeset 550:fff43091ccc9 openid

Send raw response on authentication failure instead of HTTP error document.
author Andre Heinecke <andre.heinecke@intevation.de>
date Wed, 11 Mar 2015 14:50:40 +0100
parents 130e647078ea
children 68c8b9e5f3e9
files src/main/java/de/intevation/lada/util/auth/OpenIDFilter.java
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/main/java/de/intevation/lada/util/auth/OpenIDFilter.java	Tue Mar 10 16:58:43 2015 +0100
+++ b/src/main/java/de/intevation/lada/util/auth/OpenIDFilter.java	Wed Mar 11 14:50:40 2015 +0100
@@ -284,9 +284,12 @@
                         e.getMessage());
             }
         }
-        hResp.sendError(401, "{\"success\":false,\"message\":\"699\",\"data\":" +
+        hResp.reset();
+        hResp.setStatus(401);
+        hResp.getOutputStream().print("{\"success\":false,\"message\":\"699\",\"data\":" +
                 "\"" + authRequestURL + "\",\"errors\":{},\"warnings\":{}," +
                 "\"readonly\":false,\"totalCount\":0}");
+        hResp.getOutputStream().flush();
     }
     @Override
     public void destroy()
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)