summaryrefslogtreecommitdiff
path: root/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/tasks/FinalizeAuthenticationTask.java
diff options
context:
space:
mode:
authorThomas Lenz <thomas.lenz@egiz.gv.at>2019-05-03 06:59:13 +0200
committerThomas Lenz <thomas.lenz@egiz.gv.at>2019-05-03 06:59:13 +0200
commitdc8587693201e34fe0f7a87b3e401fac4325ce04 (patch)
tree80a574fe7b6429256e5dcb86969f6c8687862b73 /eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/tasks/FinalizeAuthenticationTask.java
parent02851082661a924adc68230615f61a308705ce2b (diff)
downloadEAAF-Components-dc8587693201e34fe0f7a87b3e401fac4325ce04.tar.gz
EAAF-Components-dc8587693201e34fe0f7a87b3e401fac4325ce04.tar.bz2
EAAF-Components-dc8587693201e34fe0f7a87b3e401fac4325ce04.zip
update process finalization and update pendingReqIdGenerationStrategy
Diffstat (limited to 'eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/tasks/FinalizeAuthenticationTask.java')
-rw-r--r--eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/tasks/FinalizeAuthenticationTask.java29
1 files changed, 5 insertions, 24 deletions
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/tasks/FinalizeAuthenticationTask.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/tasks/FinalizeAuthenticationTask.java
index eff6b631..b12a69b2 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/tasks/FinalizeAuthenticationTask.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/tasks/FinalizeAuthenticationTask.java
@@ -26,20 +26,15 @@
*******************************************************************************/
package at.gv.egiz.eaaf.core.impl.idp.controller.tasks;
-import java.io.Serializable;
-
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.cglib.proxy.Dispatcher;
import org.springframework.stereotype.Component;
import at.gv.egiz.eaaf.core.api.data.EAAFConstants;
import at.gv.egiz.eaaf.core.api.idp.auth.IAuthenticationManager;
-import at.gv.egiz.eaaf.core.api.idp.auth.services.IProtocolAuthenticationService;
import at.gv.egiz.eaaf.core.api.idp.process.ExecutionContext;
import at.gv.egiz.eaaf.core.exceptions.EAAFException;
import at.gv.egiz.eaaf.core.exceptions.TaskExecutionException;
@@ -53,9 +48,7 @@ import at.gv.egiz.eaaf.core.impl.idp.auth.modules.AbstractAuthServletTask;
public class FinalizeAuthenticationTask extends AbstractAuthServletTask {
private static final Logger log = LoggerFactory.getLogger(FinalizeAuthenticationTask.class);
-
- @Autowired(required=true) IProtocolAuthenticationService protAuchService;
-
+
/* (non-Javadoc)
* @see at.gv.egovernment.moa.id.process.springweb.MoaIdTask#execute(at.gv.egovernment.moa.id.process.api.ExecutionContext, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
*/
@@ -68,25 +61,13 @@ public class FinalizeAuthenticationTask extends AbstractAuthServletTask {
//set pending request to authenticated
pendingReq.setAuthenticated(true);
revisionsLogger.logEvent(pendingReq, IAuthenticationManager.EVENT_AUTHENTICATION_PROCESS_FINISHED);
+ performRedirectToProtocolFinialization(executionContext, pendingReq, request, response);
-
- Object frontChannelRedirectFlagObj = executionContext.get(EAAFConstants.PROCESS_ENGINE_REQUIRES_NO_POSTAUTH_REDIRECT);
- if (frontChannelRedirectFlagObj != null && frontChannelRedirectFlagObj instanceof Boolean &&
- (Boolean)frontChannelRedirectFlagObj) {
- log.info("AuthProcess finished. Forward to Protocol finalization.");
- protAuchService.finalizeAuthentication(request, response, pendingReq);
-
- } else {
- log.info("AuthProcess finished. Redirect to Protocol Dispatcher.");
- requestStoreage.storePendingRequest(pendingReq);
- performRedirectToProtocolFinialization(pendingReq, response);
-
- }
-
- } catch (EAAFException e) {
+
+ } catch (final EAAFException e) {
throw new TaskExecutionException(pendingReq, e.getMessage(), e);
- } catch (Exception e) {
+ } catch (final Exception e) {
log.warn("FinalizeAuthenticationTask has an internal error", e);
throw new TaskExecutionException(pendingReq, e.getMessage(), e);