Class AbstractRemoteVerificator

  • All Implemented Interfaces:
    CredentialExchange, CredentialVerificator, StringConfigurable, pl.edu.icm.unity.types.DescribedObject, pl.edu.icm.unity.types.NamedObject

    public abstract class AbstractRemoteVerificator
    extends AbstractVerificator
    Base class that is nearly mandatory for all remote verificators. The remote verificator should extend it by implementing a CredentialExchange of choice. The implementation should obtain the RemotelyAuthenticatedInput (the actual coding should be done here) and before returning it should be processed by #getResult(RemotelyAuthenticatedInput) to obtain the final authentication result.

    Additionally (to enable compatibility with sandbox authN facility) the extension must call #startAuthnResponseProcessing(String...) at the beginning of authN response verification and #finishAuthnResponseProcessing(RemoteAuthnState, AuthenticationException, RemotelyAuthenticatedInput) in case of any exception produced during verification.

    Author:
    K. Benedyczak
    • Constructor Detail

      • AbstractRemoteVerificator

        public AbstractRemoteVerificator​(java.lang.String name,
                                         java.lang.String description,
                                         java.lang.String exchangeId,
                                         RemoteAuthnResultProcessor processor)
    • Method Detail

      • startAuthnResponseProcessing

        protected AbstractRemoteVerificator.RemoteAuthnState startAuthnResponseProcessing​(SandboxAuthnResultCallback callback,
                                                                                          java.lang.String... loggingFacilities)
        Should be called at the beginning of authN response verification
        Parameters:
        loggingFacilities - logging facilities relevant for the verification process
        Returns:
      • finishAuthnResponseProcessing

        protected void finishAuthnResponseProcessing​(AbstractRemoteVerificator.RemoteAuthnState state,
                                                     java.lang.Exception error)
        Should be called at the end of failed verification.
        Parameters:
        state -
        error -
        remoteInput - can be null if failure was upon input assembly.
      • getTranslationProfile

        public static pl.edu.icm.unity.types.translation.TranslationProfile getTranslationProfile​(UnityPropertiesHelper props,
                                                                                                  java.lang.String globalProfileNameKey,
                                                                                                  java.lang.String embeddedProfileKey)
                                                                                           throws eu.unicore.util.configuration.ConfigurationException
        Throws:
        eu.unicore.util.configuration.ConfigurationException