summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Lenz <thomas.lenz@egiz.gv.at>2019-11-15 14:07:55 +0100
committerThomas Lenz <thomas.lenz@egiz.gv.at>2019-11-15 14:07:55 +0100
commit2ba634720fd8ce44f6322f3b8ee3e930e67631b6 (patch)
tree484035c9d18ff1b01c11368193c41ff5f1b2cda0
parent1444d65102d74640711d0b9710de3355c3f45897 (diff)
downloadEAAF-Components-2ba634720fd8ce44f6322f3b8ee3e930e67631b6.tar.gz
EAAF-Components-2ba634720fd8ce44f6322f3b8ee3e930e67631b6.tar.bz2
EAAF-Components-2ba634720fd8ce44f6322f3b8ee3e930e67631b6.zip
copy some generic authProcessData directly into authData
-rw-r--r--eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/builder/AbstractAuthenticationDataBuilder.java25
1 files changed, 25 insertions, 0 deletions
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/builder/AbstractAuthenticationDataBuilder.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/builder/AbstractAuthenticationDataBuilder.java
index 4a4bcab6..2108e041 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/builder/AbstractAuthenticationDataBuilder.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/builder/AbstractAuthenticationDataBuilder.java
@@ -31,6 +31,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.Map.Entry;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
@@ -58,6 +59,7 @@ import at.gv.egiz.eaaf.core.exceptions.EAAFBuilderException;
import at.gv.egiz.eaaf.core.exceptions.EAAFConfigurationException;
import at.gv.egiz.eaaf.core.exceptions.EAAFException;
import at.gv.egiz.eaaf.core.exceptions.EAAFParserException;
+import at.gv.egiz.eaaf.core.exceptions.EAAFStorageException;
import at.gv.egiz.eaaf.core.exceptions.XPathException;
import at.gv.egiz.eaaf.core.impl.data.Pair;
import at.gv.egiz.eaaf.core.impl.idp.AuthenticationData;
@@ -69,6 +71,11 @@ import at.gv.egiz.eaaf.core.impl.utils.XPathUtils;
public abstract class AbstractAuthenticationDataBuilder implements IAuthenticationDataBuilder {
private static final Logger log = LoggerFactory.getLogger(AbstractAuthenticationDataBuilder.class);
+ /**
+ * Identify authProcessData that should be directly mapped into authData
+ */
+ public static final String GENERIC_AUTHDATA_IDENTIFIER = "authData_";
+
public static final String CONFIG_PROP_ENABLE_IDL_ATTRIBUTE_ESCAPEING = "configuration.bugfix.enable.idl.escaping";
protected Collection<String> includedToGenericAuthData = null;
@@ -189,6 +196,24 @@ public abstract class AbstractAuthenticationDataBuilder implements IAuthenticati
//set citizen country-code
setCitizenCountryCode(internalAuthData, authProcessData, pendingReq);
+
+ //set generic authProcessData to authdata
+ for (final Entry<String, Object> el : authProcessData.getGenericSessionDataStorage().entrySet()) {
+ if (el.getKey().startsWith(GENERIC_AUTHDATA_IDENTIFIER)) {
+ log.trace("Find generic authProcessData {}. Map it directly to authData", el.getKey());
+ try {
+ internalAuthData.setGenericData(el.getKey(), el.getValue());
+
+ } catch (final EAAFStorageException e) {
+ log.warn("Can NOT set authData with key: {}", el.getKey(), null, e);
+
+ }
+
+ }
+
+ }
+
+
}
/**