diff options
author | Thomas <> | 2024-10-09 09:27:13 +0200 |
---|---|---|
committer | Thomas <> | 2024-10-09 09:27:13 +0200 |
commit | 02c8926d1ae2e9b7ed0d9693b46a878711b145f1 (patch) | |
tree | 647aac9b47d4446094e3a601c98bce3745985e9d | |
parent | 8d6cef78f6665f880bb4fbc07848f097c94fda76 (diff) | |
download | EAAF-Components-02c8926d1ae2e9b7ed0d9693b46a878711b145f1.tar.gz EAAF-Components-02c8926d1ae2e9b7ed0d9693b46a878711b145f1.tar.bz2 EAAF-Components-02c8926d1ae2e9b7ed0d9693b46a878711b145f1.zip |
chore(core): optimize process parameters for Web-based or iFrame-based authentication processes
4 files changed, 42 insertions, 27 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 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<String, Object> 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; } } diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/IRequest.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/IRequest.java index e10ec716..a4b532c7 100644 --- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/IRequest.java +++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/IRequest.java @@ -272,21 +272,39 @@ public interface IRequest extends Serializable { void setAbortedByUser(boolean isAborted); /** - * Indicates, if the current process stage is in iFrame. + * Indicates, if the current process stage is Web-Browser based. * - * <p>If the current state is marked as 'in iFrame', - * than the process engine will perform an target=_parent hope in case of an error</p> * - * @return true, if the process is in iFrame, otherwise false + * @return true, if the process is in Web-Browser, otherwise false */ - boolean isProcessInIframe(); + boolean isWebBasedProcess(); /** - * Set the 'isProcessInIframe' flag to this pending-request. + * Set the 'isWebBasedProcess' flag to this pending-request. * - * @param flag true, if the process is in iFrame and needs a target=_parent hope in case of an error + * @param flag true, if the process is in Web-Browser */ - void setProcessInFrame(boolean flag); + void setWebBasedProcess(boolean flag); + + /** + * Indicates, if the current process stage is iFrame based. + * + * <p> + * If the current state is marked as 'in iFrame', than the process engine will + * perform an target=_parent hope in case of an error + * </p> + * + * @return true, if the process is in Web-Browser, otherwise false + */ + boolean isIframebBasedProcess(); + + /** + * Set the 'isIFramebBasedProcess' flag to this pending-request. + * + * @param flag true, if the process is an iFrame and needs a target=_parent hope + * in case of an error + */ + void setIframebBasedProcess(boolean flag); |