aboutsummaryrefslogtreecommitdiff
path: root/connector/src/main/java/at
diff options
context:
space:
mode:
Diffstat (limited to 'connector/src/main/java/at')
-rw-r--r--connector/src/main/java/at/asitplus/eidas/specific/connector/verification/AuthnRequestValidator.java13
1 files changed, 7 insertions, 6 deletions
diff --git a/connector/src/main/java/at/asitplus/eidas/specific/connector/verification/AuthnRequestValidator.java b/connector/src/main/java/at/asitplus/eidas/specific/connector/verification/AuthnRequestValidator.java
index 0230521c..87c23dee 100644
--- a/connector/src/main/java/at/asitplus/eidas/specific/connector/verification/AuthnRequestValidator.java
+++ b/connector/src/main/java/at/asitplus/eidas/specific/connector/verification/AuthnRequestValidator.java
@@ -103,12 +103,13 @@ public class AuthnRequestValidator implements IAuthnRequestValidator {
if (StringUtils.isEmpty(providerName)) {
log.info("Authn. request contains NO SP friendlyName");
} else {
- pendingReq.setRawDataToTransaction(MsEidasNodeConstants.DATA_PROVIDERNAME, spEntityId);
+ pendingReq.setRawDataToTransaction(MsEidasNodeConstants.DATA_PROVIDERNAME, providerName);
}
// post-process requested LoA
final List<String> reqLoA = extractLoA(authnReq);
-
+ log.trace("SP requests LoA with: {}", String.join(", ",reqLoA));
+
LevelOfAssurance minimumLoAFromConfig = LevelOfAssurance.fromString(basicConfig.getBasicConfiguration(
MsEidasNodeConstants.PROP_EIDAS_REQUEST_LOA_MINIMUM_LEVEL,
EaafConstants.EIDAS_LOA_HIGH));
@@ -118,21 +119,21 @@ public class AuthnRequestValidator implements IAuthnRequestValidator {
minimumLoAFromConfig = LevelOfAssurance.HIGH;
}
-
+
log.trace("Validate requested LoA to connector configuration minimum LoA: {} ...",
- minimumLoAFromConfig);
+ minimumLoAFromConfig);
final List<String> allowedLoA = new ArrayList<>();
for (final String loa : reqLoA) {
try {
final LevelOfAssurance intLoa = LevelOfAssurance.fromString(loa);
String selectedLoA = EaafConstants.EIDAS_LOA_HIGH;
if (intLoa != null
- && intLoa.numericValue() >= minimumLoAFromConfig.numericValue()) {
+ && intLoa.numericValue() <= minimumLoAFromConfig.numericValue()) {
log.info("Client: {} requested LoA: {} will be upgraded to: {}",
pendingReq.getServiceProviderConfiguration().getUniqueIdentifier(),
loa,
minimumLoAFromConfig);
- selectedLoA = intLoa.getValue();
+ selectedLoA = minimumLoAFromConfig.getValue();
}