summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas <>2021-03-10 12:09:02 +0100
committerThomas <>2021-03-10 12:09:02 +0100
commit051aa9e8ecd657bc4cb088c0826e0c4dc5a30a70 (patch)
treef8bf88c92d277ddd2846c13f0f0728fce116e150
parent88274ec9fcd35554a5f5f0ddcdef47c5797febd5 (diff)
downloadEAAF-Components-051aa9e8ecd657bc4cb088c0826e0c4dc5a30a70.tar.gz
EAAF-Components-051aa9e8ecd657bc4cb088c0826e0c4dc5a30a70.tar.bz2
EAAF-Components-051aa9e8ecd657bc4cb088c0826e0c4dc5a30a70.zip
add AuthSessionWrapper for ID Austria specific information
-rw-r--r--eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/data/EidAuthProcessDataWrapper.java34
-rw-r--r--eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/auth/data/IEidAuthProcessData.java25
2 files changed, 59 insertions, 0 deletions
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/data/EidAuthProcessDataWrapper.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/data/EidAuthProcessDataWrapper.java
new file mode 100644
index 00000000..48a2206b
--- /dev/null
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/data/EidAuthProcessDataWrapper.java
@@ -0,0 +1,34 @@
+package at.gv.egiz.eaaf.core.impl.idp.auth.data;
+
+import java.util.Map;
+
+import at.gv.egiz.eaaf.core.api.idp.auth.data.IEidAuthProcessData;
+
+/**
+ * Authentication session-data that adds ID Austria specific information.
+ *
+ * @author tlenz
+ *
+ */
+public class EidAuthProcessDataWrapper extends AuthProcessDataWrapper implements IEidAuthProcessData {
+
+ private static final String VALUE_INTERNAL_TEST_IDENTITY_PROCESS = "direct_is_testidentity";
+
+ public EidAuthProcessDataWrapper(Map<String, Object> authProcessData) {
+ super(authProcessData);
+
+ }
+
+ @Override
+ public boolean isTestIdentity() {
+ return wrapStoredObject(VALUE_INTERNAL_TEST_IDENTITY_PROCESS, false, Boolean.class);
+
+ }
+
+ @Override
+ public void setTestIdentity(boolean flag) {
+ authProcessData.put(VALUE_INTERNAL_TEST_IDENTITY_PROCESS, flag);
+
+ }
+
+}
diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/auth/data/IEidAuthProcessData.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/auth/data/IEidAuthProcessData.java
new file mode 100644
index 00000000..36298824
--- /dev/null
+++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/auth/data/IEidAuthProcessData.java
@@ -0,0 +1,25 @@
+package at.gv.egiz.eaaf.core.api.idp.auth.data;
+
+/**
+ * Authentication session-data that adds ID Austria specific information.
+ *
+ * @author tlenz
+ *
+ */
+public interface IEidAuthProcessData extends IAuthProcessDataContainer {
+
+ /**
+ * Flag that indicates if user is a test-identity.
+ *
+ * @return <code>true</code> if user is a test-identity, otherwise <code>false</code>
+ */
+ boolean isTestIdentity();
+
+
+ /**
+ * Set test-identity flag for this user.
+ *
+ * @param flag <code>true</code> if user is a test-identity
+ */
+ void setTestIdentity(boolean flag);
+}