From 3af746e70a157c2f9d46a81f35167dd00e74bd53 Mon Sep 17 00:00:00 2001 From: Thomas <> Date: Thu, 7 Dec 2023 15:57:39 +0100 Subject: refact(proxyservie): simplify method API --- .../msproxyservice/protocol/ProxyServiceAuthenticationAction.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'modules/eidas_proxy-sevice') diff --git a/modules/eidas_proxy-sevice/src/main/java/at/asitplus/eidas/specific/modules/msproxyservice/protocol/ProxyServiceAuthenticationAction.java b/modules/eidas_proxy-sevice/src/main/java/at/asitplus/eidas/specific/modules/msproxyservice/protocol/ProxyServiceAuthenticationAction.java index 8fc54e39..f3dcb968 100644 --- a/modules/eidas_proxy-sevice/src/main/java/at/asitplus/eidas/specific/modules/msproxyservice/protocol/ProxyServiceAuthenticationAction.java +++ b/modules/eidas_proxy-sevice/src/main/java/at/asitplus/eidas/specific/modules/msproxyservice/protocol/ProxyServiceAuthenticationAction.java @@ -242,7 +242,7 @@ public class ProxyServiceAuthenticationAction implements IAction { IEidAuthData eidAuthData) { eidasReq.getRequestedAttributes().getAttributeMap().keySet().stream() .forEach(el -> injectEidasAttribute(attributeMap, eidAuthData, - el.getNameUri().toString(), eidAuthData.isUseMandate(), el.isRequired())); + el.getNameUri().toString(), el.isRequired())); } @@ -251,14 +251,14 @@ public class ProxyServiceAuthenticationAction implements IAction { ImmutableAttributeMap requestedAttributes) { attrRegistry.getRepresentativeAttributesToAddByDefault() .filter(el -> requestedAttributes.getAttributeValuesByNameUri(el) == null) - .forEach(el -> injectEidasAttribute(attributeMap, eidAuthData, el, true, true)); + .forEach(el -> injectEidasAttribute(attributeMap, eidAuthData, el, true)); } private void injectEidasAttribute(ImmutableAttributeMap.Builder attributeMap, IEidAuthData eidAuthData, - String eidasAttrName, boolean mandatesUsed, boolean isRequired) { + String eidasAttrName, boolean isRequired) { final Optional releatedIdaAttribute = - attrRegistry.mapEidasAttributeToSpecificIdaAttribute(eidasAttrName, mandatesUsed); + attrRegistry.mapEidasAttributeToSpecificIdaAttribute(eidasAttrName, eidAuthData.isUseMandate()); if (releatedIdaAttribute.isPresent()) { log.trace("Mapping IDA attribute: {} to eIDAS attribute: {}", releatedIdaAttribute.get(), eidasAttrName); -- cgit v1.2.3