[Lada-commits] [PATCH] Send raw response on authentication failure instead of HTTP error document
Wald Commits
scm-commit at wald.intevation.org
Wed Mar 11 14:50:49 CET 2015
# HG changeset patch
# User Andre Heinecke <andre.heinecke at intevation.de>
# Date 1426081840 -3600
# Branch openid
# Node ID fff43091ccc93e100c714fd9ba6133d4ed91ae22
# Parent 130e647078ead9bc2b23d2f55d9114771ec61858
Send raw response on authentication failure instead of HTTP error document.
diff -r 130e647078ea -r fff43091ccc9 src/main/java/de/intevation/lada/util/auth/OpenIDFilter.java
--- 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()
More information about the Lada-commits
mailing list