package at.asitplus.eidas.specific.modules.msproxyservice.handler; import javax.annotation.Nullable; import at.asitplus.eidas.specific.core.config.ServiceProviderConfiguration; import at.asitplus.eidas.specific.modules.msproxyservice.exception.EidasProxyServiceException; import at.gv.egiz.eaaf.core.api.idp.IEidAuthData; import eu.eidas.auth.commons.light.ILightRequest; import lombok.NonNull; /** * Handlers for attribute-processing that requires more features than a simple mapping. * *

Important: That interface provides attribute-specific extension- and modification hooks for * post-processing of service configuration and authentication data. If more than one attribute-specific implementation * operates on the same process, concurrency issues are possible because any implementation of that interface are * executed independent from each other.

* * @author tlenz * */ public interface IEidasAttributeHandler { /** * Perform attribute-releated post-processing of internal Service-Provider configuration. * *

Important: Modifications done by that method are independent from any other implementation of * the same interface and there is no specific order if more than one handler are selected.
* Therefore, concurrency issues has to be noticed!

* * @param spConfig SP configuration that was build from incoming eIDAS Authn. request. */ void performSpConfigPostprocessing(@NonNull ServiceProviderConfiguration spConfig); /** * Perform attribute-specific post-processing of authentication information. * *

Important: Modifications done by that method are independent from any other implementation of * the same interface and there is no specific order if more than one handler are selected.
* Therefore, concurrency issues has to be noticed!

* * @param authData authentication information from ID Austria system that should be post processed. */ @NonNull void performAuthDataPostprocessing(@NonNull IEidAuthData authData); /** * Build eIDAS attribute-value from authentication data. * * @param eidAuthData Authentication data for current process * @return attribute-value if attribute is available, otherwise null */ @Nullable String buildAttributeValue(@NonNull IEidAuthData eidAuthData); /** * Extended validation of incoming eIDAS AuthnRequest. * * @param eidasRequest Incoming eIDAS authentication request * @throws EidasProxyServiceException In case of a validation error */ void validateAuthnRequest(ILightRequest eidasRequest) throws EidasProxyServiceException; }