summaryrefslogtreecommitdiff
path: root/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/data
diff options
context:
space:
mode:
Diffstat (limited to 'eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/data')
-rw-r--r--eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/data/AuthProcessDataWrapper.java28
1 files changed, 17 insertions, 11 deletions
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/data/AuthProcessDataWrapper.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/data/AuthProcessDataWrapper.java
index 8eef4a8e..368652be 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/data/AuthProcessDataWrapper.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/data/AuthProcessDataWrapper.java
@@ -22,9 +22,11 @@ package at.gv.egiz.eaaf.core.impl.idp.auth.data;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
-import java.util.HashMap;
import java.util.Map;
+import java.util.Map.Entry;
import java.util.TimeZone;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
import javax.annotation.Nullable;
@@ -264,16 +266,20 @@ public class AuthProcessDataWrapper
* getGenericSessionDataStorage()
*/
@Override
- public Map<String, Object> getGenericSessionDataStorage() {
- final Map<String, Object> result = new HashMap<>();
- for (final Map.Entry<String, Object> el : authProcessData.entrySet()) {
- if (el.getKey().startsWith(GENERIC_PREFIX)) {
- result.put(el.getKey().substring(GENERIC_PREFIX.length()), el.getValue());
- }
-
- }
-
- return result;
+ public Map<String, Object> getGenericSessionDataStorage() {
+ return authProcessData.entrySet().stream()
+ .filter(el -> el.getKey().startsWith(GENERIC_PREFIX))
+ .collect(
+ Collectors.toMap(
+ el -> el.getKey().substring(GENERIC_PREFIX.length()),
+ value -> value.getValue()));
+
+ }
+
+ @Override
+ public Stream<Entry<String, Object>> getGenericSessionDataStream() {
+ return getGenericSessionDataStorage().entrySet().stream();
+
}
/*