Class CheckAndRecordServerTLSEntityAuthenticationtHandler

All Implemented Interfaces:
Component, DestructableComponent, InitializableComponent, MessageHandler

public class CheckAndRecordServerTLSEntityAuthenticationtHandler
extends 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 Details

  • Constructor Details

    • CheckAndRecordServerTLSEntityAuthenticationtHandler

      public CheckAndRecordServerTLSEntityAuthenticationtHandler()
  • Method Details

    • setHttpClientContextLookup

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

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

      Defaults to: SAMLPeerEntityContext.

      clazz - the entity context class type
    • setEntityIDLookup

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

      protected void doInvoke​(@Nonnull MessageContext messageContext) throws MessageHandlerException
      Performs the handler logic.
      Specified by:
      doInvoke in class AbstractMessageHandler
      messageContext - the message context on which to invoke the handler
      MessageHandlerException - if there is an error invoking the handler on the message context