Class CheckAndRecordServerTLSEntityAuthenticationtHandler

  • All Implemented Interfaces:
    net.shibboleth.utilities.java.support.component.Component, net.shibboleth.utilities.java.support.component.DestructableComponent, net.shibboleth.utilities.java.support.component.InitializableComponent, org.opensaml.messaging.handler.MessageHandler

    public class CheckAndRecordServerTLSEntityAuthenticationtHandler
    extends org.opensaml.messaging.handler.AbstractMessageHandler
    Handler implementation that checks and records the result of HttpClient server TLS authentication as stored in the @link HttpClientContext resolved via strategy function.

    If server TLS was performed and successful, store a positive authentication result in the configured AbstractAuthenticatableSAMLEntityContext. If the entity context's entityID is not already populated, and the appropriate entityID strategy function is configured, also attempt to resolve the authenticated entityID and if successful populate the entity context.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private Class<? extends org.opensaml.saml.common.messaging.context.AbstractAuthenticatableSAMLEntityContext> entityContextClass
      The actual context class holding the authenticatable SAML entity.
      private org.opensaml.messaging.context.navigate.ContextDataLookupFunction<org.opensaml.messaging.context.MessageContext,​String> entityIDLookup
      The strategy function for resolving the authenticated entityID.
      private org.opensaml.messaging.context.navigate.ContextDataLookupFunction<org.opensaml.messaging.context.MessageContext,​org.apache.http.client.protocol.HttpClientContext> httpClientContextLookup
      The strategy function for resolving the to evaluate.
      private org.slf4j.Logger log
      Logger.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void doInvoke​(org.opensaml.messaging.context.MessageContext messageContext)
      void setEntityContextClass​(Class<? extends org.opensaml.saml.common.messaging.context.AbstractAuthenticatableSAMLEntityContext> clazz)
      Set the class type holding the authenticatable SAML entity data.
      void setEntityIDLookup​(org.opensaml.messaging.context.navigate.ContextDataLookupFunction<org.opensaml.messaging.context.MessageContext,​String> strategy)
      Set the strategy function for resolving the authenticated entityID.
      void setHttpClientContextLookup​(org.opensaml.messaging.context.navigate.ContextDataLookupFunction<org.opensaml.messaging.context.MessageContext,​org.apache.http.client.protocol.HttpClientContext> strategy)
      Set the strategy function for resolving the to evaluate.
      • Methods inherited from class org.opensaml.messaging.handler.AbstractMessageHandler

        doPostInvoke, doPostInvoke, doPreInvoke, getActivationCondition, getLogPrefix, invoke, setActivationCondition
      • Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent

        destroy, doDestroy, doInitialize, initialize, isDestroyed, isInitialized
      • Methods inherited from interface net.shibboleth.utilities.java.support.component.InitializableComponent

        initialize, isInitialized
    • Field Detail

      • log

        private org.slf4j.Logger log
        Logger.
      • httpClientContextLookup

        @Nonnull
        private org.opensaml.messaging.context.navigate.ContextDataLookupFunction<org.opensaml.messaging.context.MessageContext,​org.apache.http.client.protocol.HttpClientContext> httpClientContextLookup
        The strategy function for resolving the to evaluate.
      • entityIDLookup

        @Nonnull
        private org.opensaml.messaging.context.navigate.ContextDataLookupFunction<org.opensaml.messaging.context.MessageContext,​String> entityIDLookup
        The strategy function for resolving the authenticated entityID.
      • entityContextClass

        @Nonnull
        private Class<? extends org.opensaml.saml.common.messaging.context.AbstractAuthenticatableSAMLEntityContext> entityContextClass
        The actual context class holding the authenticatable SAML entity.
    • Constructor Detail

      • CheckAndRecordServerTLSEntityAuthenticationtHandler

        public CheckAndRecordServerTLSEntityAuthenticationtHandler()
        Constructor.
    • Method Detail

      • setHttpClientContextLookup

        public void setHttpClientContextLookup​(@Nonnull
                                               org.opensaml.messaging.context.navigate.ContextDataLookupFunction<org.opensaml.messaging.context.MessageContext,​org.apache.http.client.protocol.HttpClientContext> strategy)
        Set the strategy function for resolving the to evaluate.
        Parameters:
        strategy - the new strategy function
      • setEntityContextClass

        public void setEntityContextClass​(@Nonnull
                                          Class<? extends org.opensaml.saml.common.messaging.context.AbstractAuthenticatableSAMLEntityContext> clazz)
        Set the class type holding the authenticatable SAML entity data.

        Defaults to: SAMLPeerEntityContext.

        Parameters:
        clazz - the entity context class type
      • setEntityIDLookup

        public void setEntityIDLookup​(@Nullable
                                      org.opensaml.messaging.context.navigate.ContextDataLookupFunction<org.opensaml.messaging.context.MessageContext,​String> strategy)
        Set the strategy function for resolving the authenticated entityID.
        Parameters:
        strategy - the new strategy function, or null
      • doInvoke

        protected void doInvoke​(@Nonnull
                                org.opensaml.messaging.context.MessageContext messageContext)
                         throws org.opensaml.messaging.handler.MessageHandlerException
        Specified by:
        doInvoke in class org.opensaml.messaging.handler.AbstractMessageHandler
        Throws:
        org.opensaml.messaging.handler.MessageHandlerException