From 02c8926d1ae2e9b7ed0d9693b46a878711b145f1 Mon Sep 17 00:00:00 2001 From: Thomas <> Date: Wed, 9 Oct 2024 09:27:13 +0200 Subject: chore(core): optimize process parameters for Web-based or iFrame-based authentication processes --- .../auth/services/ProtocolAuthenticationService.java | 2 +- .../core/impl/idp/controller/protocols/RequestImpl.java | 16 +++------------- .../eaaf/core/impl/idp/module/test/TestRequestImpl.java | 17 ++++++++++++----- 3 files changed, 16 insertions(+), 19 deletions(-) (limited to 'eaaf_core') 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 9b8900da..0ab1f5ff 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 @@ -628,7 +628,7 @@ public class ProtocolAuthenticationService implements IProtocolAuthenticationSer } private IGuiBuilderConfiguration evaluateRequiredErrorHandlingMethod(IRequest first, String errorId) { - if (first != null && first.isProcessInIframe()) { + if (first != null && first.isIframebBasedProcess()) { return guiConfigFactory .getDefaultIFrameParentHopGui(first, ProtocolFinalizationController.ENDPOINT_ERRORHANDLING, errorId); diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/protocols/RequestImpl.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/protocols/RequestImpl.java index ee4f2aaf..66035114 100644 --- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/protocols/RequestImpl.java +++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/protocols/RequestImpl.java @@ -108,7 +108,9 @@ public abstract class RequestImpl implements IRequest, Serializable { private boolean needUserConsent = false; - private boolean currentlyInIframe = false; + private boolean webBasedProcess = true; + + private boolean iframebBasedProcess = false; private final Map genericDataStorage = new HashMap<>(); @@ -482,18 +484,6 @@ public abstract class RequestImpl implements IRequest, Serializable { } - @JsonIgnore - @Override - public boolean isProcessInIframe() { - return this.currentlyInIframe; - } - - @Override - public void setProcessInFrame(boolean flag) { - this.currentlyInIframe = flag; - - } - @Override public final Object getRawData(final String key) { if (StringUtils.isNotEmpty(key)) { diff --git a/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/module/test/TestRequestImpl.java b/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/module/test/TestRequestImpl.java index cc620dc8..1c2b98f1 100644 --- a/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/module/test/TestRequestImpl.java +++ b/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/module/test/TestRequestImpl.java @@ -30,6 +30,8 @@ import at.gv.egiz.eaaf.core.api.IRequest; import at.gv.egiz.eaaf.core.api.idp.ISpConfiguration; import at.gv.egiz.eaaf.core.exceptions.EaafStorageException; import at.gv.egiz.eaaf.core.impl.idp.auth.data.AuthProcessDataWrapper; +import lombok.Getter; +import lombok.Setter; /** * Test pending-request for jUnit tests. @@ -49,9 +51,14 @@ public class TestRequestImpl implements IRequest { private boolean authenticated; private boolean needAuthentication = false; private boolean stoppedByUser; - private boolean currentlyInIframe = false; private String piiTransactionId; + private boolean webBasedProcess = true; + + @Getter + @Setter + private boolean iframebBasedProcess = false; + /* * (non-Javadoc) * @@ -396,13 +403,13 @@ public class TestRequestImpl implements IRequest { } @Override - public boolean isProcessInIframe() { - return this.currentlyInIframe; + public boolean isWebBasedProcess() { + return this.webBasedProcess; } @Override - public void setProcessInFrame(boolean flag) { - this.currentlyInIframe = flag; + public void setWebBasedProcess(boolean flag) { + this.webBasedProcess = flag; } } -- cgit v1.2.3