diff options
Diffstat (limited to 'eidas_modules/eidas_proxy-sevice/src')
-rw-r--r-- | eidas_modules/eidas_proxy-sevice/src/main/java/at/asitplus/eidas/specific/modules/msproxyservice/protocol/EidasProxyServiceController.java | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/eidas_modules/eidas_proxy-sevice/src/main/java/at/asitplus/eidas/specific/modules/msproxyservice/protocol/EidasProxyServiceController.java b/eidas_modules/eidas_proxy-sevice/src/main/java/at/asitplus/eidas/specific/modules/msproxyservice/protocol/EidasProxyServiceController.java index 0316d434..8957d7db 100644 --- a/eidas_modules/eidas_proxy-sevice/src/main/java/at/asitplus/eidas/specific/modules/msproxyservice/protocol/EidasProxyServiceController.java +++ b/eidas_modules/eidas_proxy-sevice/src/main/java/at/asitplus/eidas/specific/modules/msproxyservice/protocol/EidasProxyServiceController.java @@ -408,16 +408,17 @@ public class EidasProxyServiceController extends AbstractController implements I log.trace("eIDAS Proxy-Service allows mandates for Connector: {}. Selecting profiles ... ", spConfig.getUniqueIdentifier()); - //check if legal person is requested - boolean isLegalPersonRequested = EidasProxyServiceUtils.isLegalPersonRequested(eidasRequest); - - // set mandate profiles - if (isLegalPersonRequested) { + //check if legal person is requested + if (EidasProxyServiceUtils.isLegalPersonRequested(eidasRequest)) { spConfig.setMandateProfiles(KeyValueUtils.getListOfCsvValues( - spConfig.getConfigurationValue(MsProxyServiceConstants.CONIG_PROPS_CONNECTOR_MANDATES_PROFILE_LEGAL))); - + spConfig.getConfigurationValue(MsProxyServiceConstants.CONIG_PROPS_CONNECTOR_MANDATES_PROFILE_LEGAL))); spConfig.setMandateMode(SpMandateModes.LEGAL_FORCE); + if (spConfig.getMandateProfiles().isEmpty()) { + throw new EidasProxyServiceException(ERROR_10, null); + + } + } else if (EidasProxyServiceUtils.isNaturalPersonRequested(eidasRequest)) { spConfig.setMandateProfiles(KeyValueUtils.getListOfCsvValues( spConfig.getConfigurationValue(MsProxyServiceConstants.CONIG_PROPS_CONNECTOR_MANDATES_PROFILE_NATURAL))); @@ -426,10 +427,8 @@ public class EidasProxyServiceController extends AbstractController implements I } - if (isLegalPersonRequested && spConfig.getMandateProfiles().isEmpty()) { - throw new EidasProxyServiceException(ERROR_10, null); - - } else if (spConfig.getMandateProfiles().isEmpty()) { + + if (spConfig.getMandateProfiles().isEmpty()) { log.debug("No mandate-profiles for issure: {}. Set mandate-mode to 'none'", spConfig.getUniqueIdentifier()); spConfig.setMandateMode(SpMandateModes.NONE); @@ -437,8 +436,7 @@ public class EidasProxyServiceController extends AbstractController implements I } else { log.debug("Set mandate-profiles: {} to request from issuer: {}", spConfig.getMandateProfiles(), spConfig.getUniqueIdentifier()); - - + } } |