summaryrefslogtreecommitdiff
path: root/eaaf_core/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'eaaf_core/src/main/java')
-rw-r--r--eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/services/ProtocolAuthenticationService.java24
1 files changed, 12 insertions, 12 deletions
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/services/ProtocolAuthenticationService.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/services/ProtocolAuthenticationService.java
index 087d83a2..0aa7ff89 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/services/ProtocolAuthenticationService.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/services/ProtocolAuthenticationService.java
@@ -373,16 +373,6 @@ public class ProtocolAuthenticationService implements IProtocolAuthenticationSer
}
}
- private void writeBadRequestErrorResponse(final HttpServletRequest req, final HttpServletResponse resp, final EAAFException e) throws IOException {
- final String code = statusMessager.mapInternalErrorToExternalError(((InvalidProtocolRequestException)e).getErrorId());
- final String descr = StringEscapeUtils.escapeHtml4(StringEscapeUtils.escapeEcmaScript(e.getMessage()));
- resp.setContentType(EAAFConstants.CONTENTTYPE_HTML_UTF8);
- resp.sendError(HttpServletResponse.SC_BAD_REQUEST, "Protocol validation FAILED!" +
- "(Errorcode=" + code +
- " | Description=" + descr + ")");
-
- }
-
private void writeHTMLErrorResponse(@NonNull final HttpServletRequest httpReq, @NonNull final HttpServletResponse httpResp,
@NonNull final String msg, @NonNull final String errorCode, @Nullable final Object[] params, @NonNull final Exception error) throws IOException, EAAFException {
@@ -464,11 +454,21 @@ public class ProtocolAuthenticationService implements IProtocolAuthenticationSer
statisticLogger.logErrorOperation(ex, ex.getErrorRequest());
//write error message
- writeBadRequestErrorResponse(req, resp, (EAAFException) e);
+ //writeBadRequestErrorResponse(req, resp, (EAAFException) e);
+ writeHTMLErrorResponse(req, resp,
+ e.getMessage(),
+ statusMessager.getResponseErrorCode(e),
+ null,
+ e);
} else if (e instanceof InvalidProtocolRequestException) {
//send error response
- writeBadRequestErrorResponse(req, resp, (EAAFException) e);
+ //writeBadRequestErrorResponse(req, resp, (EAAFException) e);
+ writeHTMLErrorResponse(req, resp,
+ e.getMessage(),
+ statusMessager.getResponseErrorCode(e),
+ null,
+ e);
} else if (e instanceof ConfigurationException) {
//send HTML formated error message