package at.asitplus.eidas.specific.modules.msproxyservice.handler; import at.gv.egiz.eaaf.core.api.idp.IEidAuthData; import at.gv.egiz.eaaf.core.impl.idp.EidAuthenticationData; import lombok.NonNull; import lombok.extern.slf4j.Slf4j; /** * eJustic PersonRole attribute-handler for natural-person use-cases only. * *

In that special case, the legal-person mandate will be ignored and * eIDAS response looks like a normal authentication without mandates.

* * @author tlenz * */ @Slf4j public class EJusticWorkaroundPersonRoleHandler extends EJusticePersonRoleHandler { @Override public void performAuthDataPostprocessing(@NonNull IEidAuthData authData) { if (authData.isUseMandate()) { log.info("eJusticeNaturalPersonRole was requested by SP. " + "Perform work-around and partially ignoring mandate from IDA system ... "); ((EidAuthenticationData)authData).setUseMandate(false); } else { log.info("eJustice attribute was requested but no mandate from ID Austria. " + "Something looks wrong, but use it as it is."); } } }