Class CheckAndRecordServerTLSEntityAuthenticationtHandler
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
org.opensaml.messaging.handler.AbstractMessageHandler
org.opensaml.saml.common.binding.security.impl.CheckAndRecordServerTLSEntityAuthenticationtHandler
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent,MessageHandler
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassThe defaultHttpClientContextstrategy function, which resolves from theHttpClientRequestContextof the outboundMessageContextof the parentInOutOperationContext. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Class<? extends AbstractAuthenticatableSAMLEntityContext>The actual context class holding the authenticatable SAML entity.The strategy function for resolving the authenticated entityID.private ContextDataLookupFunction<MessageContext,org.apache.hc.client5.http.protocol.HttpClientContext> The strategy function for resolving theto evaluate.private org.slf4j.LoggerLogger. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoInvoke(MessageContext messageContext) Performs the handler logic.voidsetEntityContextClass(Class<? extends AbstractAuthenticatableSAMLEntityContext> clazz) Set the class type holding the authenticatable SAML entity data.voidSet the strategy function for resolving the authenticated entityID.voidsetHttpClientContextLookup(ContextDataLookupFunction<MessageContext, org.apache.hc.client5.http.protocol.HttpClientContext> strategy) Set the strategy function for resolving theto evaluate.Methods inherited from class org.opensaml.messaging.handler.AbstractMessageHandler
doPostInvoke, doPostInvoke, doPreInvoke, getActivationCondition, getLogPrefix, invoke, isPreInvokeCalled, setActivationConditionMethods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, doDestroy, doInitialize, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, initialize, isDestroyed, isInitializedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.shibboleth.shared.component.InitializableComponent
initialize, isInitialized
-
Field Details
-
log
@Nonnull private org.slf4j.Logger logLogger. -
httpClientContextLookup
@Nonnull private ContextDataLookupFunction<MessageContext,org.apache.hc.client5.http.protocol.HttpClientContext> httpClientContextLookupThe strategy function for resolving theto evaluate. -
entityIDLookup
The strategy function for resolving the authenticated entityID. -
entityContextClass
The actual context class holding the authenticatable SAML entity.
-
-
Constructor Details
-
CheckAndRecordServerTLSEntityAuthenticationtHandler
public CheckAndRecordServerTLSEntityAuthenticationtHandler()Constructor.
-
-
Method Details
-
setEntityContextClass
public void setEntityContextClass(@Nonnull Class<? extends AbstractAuthenticatableSAMLEntityContext> clazz) Set the class type holding the authenticatable SAML entity data.Defaults to:
SAMLPeerEntityContext.- Parameters:
clazz- the entity context class type
-
doInvoke
Performs the handler logic.- Specified by:
doInvokein classAbstractMessageHandler- Parameters:
messageContext- the message context on which to invoke the handler- Throws:
MessageHandlerException- if there is an error invoking the handler on the message context