summaryrefslogtreecommitdiff
path: root/eaaf_core/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'eaaf_core/src/main')
-rw-r--r--eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/tasks/AbstractLocaleAuthServletTask.java37
1 files changed, 21 insertions, 16 deletions
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/tasks/AbstractLocaleAuthServletTask.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/tasks/AbstractLocaleAuthServletTask.java
index e80a63e9..e8f2bb90 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/tasks/AbstractLocaleAuthServletTask.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/tasks/AbstractLocaleAuthServletTask.java
@@ -41,22 +41,9 @@ public abstract class AbstractLocaleAuthServletTask extends AbstractAuthServletT
final String stopAuthFlag = request.getParameter(EAAFConstants.PARAM_HTTP_STOP_PROCESS);
if (StringUtils.isNotEmpty(stopAuthFlag) && Boolean.parseBoolean(stopAuthFlag)) {
- try {
- log.info("Authentication process WAS stopped by entity. Stopping auth. process ... ");
- revisionsLogger.logEvent(pendingReq, EAAFEventCodes.PROCESS_STOPPED_BY_USER);
- pendingReq.setAbortedByUser(true);
- pendingReq.setAuthenticated(false);
- performRedirectToProtocolFinialization(executionContext, pendingReq, request, response);
-
- } catch (final EAAFException e) {
- throw new TaskExecutionException(pendingReq, e.getMessage(), e);
-
- } catch (final Exception e) {
- log.warn("Stopping auth.process FAILED", e);
- throw new TaskExecutionException(pendingReq, e.getMessage(), e);
-
- }
-
+ log.info("Authentication process WAS stopped by entity. Stopping auth. process ... ");
+ stopProcessFromUserDecision(executionContext, request, response);
+
} else
executeWithLocale(executionContext, request, response);
@@ -64,6 +51,24 @@ public abstract class AbstractLocaleAuthServletTask extends AbstractAuthServletT
}
+ protected void stopProcessFromUserDecision(ExecutionContext executionContext, HttpServletRequest request, HttpServletResponse response) throws TaskExecutionException {
+ try {
+ revisionsLogger.logEvent(pendingReq, EAAFEventCodes.PROCESS_STOPPED_BY_USER);
+ pendingReq.setAbortedByUser(true);
+ pendingReq.setAuthenticated(false);
+ performRedirectToProtocolFinialization(executionContext, pendingReq, request, response);
+
+ } catch (final EAAFException e) {
+ throw new TaskExecutionException(pendingReq, e.getMessage(), e);
+
+ } catch (final Exception e) {
+ log.warn("Stopping auth.process FAILED", e);
+ throw new TaskExecutionException(pendingReq, e.getMessage(), e);
+
+ }
+
+ }
+
protected abstract void executeWithLocale(ExecutionContext executionContext, HttpServletRequest request,
HttpServletResponse response) throws TaskExecutionException;