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/controller/tasks/AbstractLocaleAuthServletTask.java15
1 files changed, 13 insertions, 2 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 e8f2bb90..84290ad0 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
@@ -39,8 +39,7 @@ public abstract class AbstractLocaleAuthServletTask extends AbstractAuthServletT
log.trace("Find {} parameter. Processing this task ... ",PROP_REQ_PARAM_LOCALE);
executionContext.remove(EAAFConstants.PROCESSCONTEXT_SWITCH_LANGUAGE);
- final String stopAuthFlag = request.getParameter(EAAFConstants.PARAM_HTTP_STOP_PROCESS);
- if (StringUtils.isNotEmpty(stopAuthFlag) && Boolean.parseBoolean(stopAuthFlag)) {
+ if (parseFlagFromHttpRequest(request, EAAFConstants.PARAM_HTTP_STOP_PROCESS, false)) {
log.info("Authentication process WAS stopped by entity. Stopping auth. process ... ");
stopProcessFromUserDecision(executionContext, request, response);
@@ -69,6 +68,18 @@ public abstract class AbstractLocaleAuthServletTask extends AbstractAuthServletT
}
+ protected boolean parseFlagFromHttpRequest(HttpServletRequest httpReq, String httpParamName, boolean defaultValue) {
+ String flag = httpReq.getParameter(httpParamName);
+ log.trace("Get httpParam: {} with value: {}", httpParamName, flag);
+ if (StringUtils.isNotEmpty(httpParamName)) {
+ return Boolean.parseBoolean(flag);
+
+ } else {
+ return defaultValue;
+ }
+
+ }
+
protected abstract void executeWithLocale(ExecutionContext executionContext, HttpServletRequest request,
HttpServletResponse response) throws TaskExecutionException;