summaryrefslogtreecommitdiff
path: root/eaaf_modules/eaaf_module_pvp2_core
diff options
context:
space:
mode:
authorThomas <>2022-12-19 14:28:16 +0100
committerThomas <>2022-12-19 14:28:16 +0100
commitb13a7517ea0f625d9b24b8d1ca709c8224e9c4d4 (patch)
treecb29b092a3338e91410d97210e81f690eb40a26c /eaaf_modules/eaaf_module_pvp2_core
parent31a4bcf1651cff3e27e35a34aa67effb33996dcb (diff)
downloadEAAF-Components-b13a7517ea0f625d9b24b8d1ca709c8224e9c4d4.tar.gz
EAAF-Components-b13a7517ea0f625d9b24b8d1ca709c8224e9c4d4.tar.bz2
EAAF-Components-b13a7517ea0f625d9b24b8d1ca709c8224e9c4d4.zip
feat(core): support not-notified eIDAS LoA
Diffstat (limited to 'eaaf_modules/eaaf_module_pvp2_core')
-rw-r--r--eaaf_modules/eaaf_module_pvp2_core/src/main/java/at/gv/egiz/eaaf/modules/pvp2/impl/utils/QaaLevelVerifier.java19
1 files changed, 10 insertions, 9 deletions
diff --git a/eaaf_modules/eaaf_module_pvp2_core/src/main/java/at/gv/egiz/eaaf/modules/pvp2/impl/utils/QaaLevelVerifier.java b/eaaf_modules/eaaf_module_pvp2_core/src/main/java/at/gv/egiz/eaaf/modules/pvp2/impl/utils/QaaLevelVerifier.java
index ca6f29e4..7ed2e939 100644
--- a/eaaf_modules/eaaf_module_pvp2_core/src/main/java/at/gv/egiz/eaaf/modules/pvp2/impl/utils/QaaLevelVerifier.java
+++ b/eaaf_modules/eaaf_module_pvp2_core/src/main/java/at/gv/egiz/eaaf/modules/pvp2/impl/utils/QaaLevelVerifier.java
@@ -19,15 +19,15 @@
package at.gv.egiz.eaaf.modules.pvp2.impl.utils;
-import java.util.List;
-
-import at.gv.egiz.eaaf.core.api.data.EaafConstants;
-import at.gv.egiz.eaaf.modules.pvp2.exception.QaaNotAllowedException;
+import java.util.Collection;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import at.gv.egiz.eaaf.core.api.data.EaafConstants;
+import at.gv.egiz.eaaf.modules.pvp2.exception.QaaNotAllowedException;
+
/**
* EAAF LoA Level verifier checks if requested LoA matchs to LoA of
* authentication.
@@ -86,17 +86,18 @@ public class QaaLevelVerifier {
* @param matchingMode LoA matching mode
* @throws QaaNotAllowedException If LoA does not match
*/
- public static void verifyQaaLevel(final String qaaAuth, final List<String> requiredLoAs,
+ public static void verifyQaaLevel(final String qaaAuth, final Collection<String> requiredLoAs,
final String matchingMode) throws QaaNotAllowedException {
- log.trace("Starting LoA verification: authLoA: " + qaaAuth + " requiredLoA: "
- + StringUtils.join(requiredLoAs, "|") + " matchingMode: " + matchingMode);
-
+ log.trace("Starting LoA verification with authLoA:{} requiredLoA:{} matchingMode:{} ",
+ qaaAuth, StringUtils.join(requiredLoAs, "|"), matchingMode);
+
boolean hasMatch = false;
for (final String loa : requiredLoAs) {
if (verifyQaaLevel(qaaAuth, loa, matchingMode)) {
hasMatch = true;
+ break;
+
}
-
}
if (!hasMatch) {