Class CheckAndRecordServerTLSEntityAuthenticationtHandler
- java.lang.Object
-
- net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
-
- org.opensaml.messaging.handler.AbstractMessageHandler
-
- org.opensaml.saml.common.binding.security.impl.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.AbstractMessageHandlerHandler implementation that checks and records the result ofHttpClientserver TLS authentication as stored in the @linkHttpClientContextresolved 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 Classes Modifier and Type Class Description classCheckAndRecordServerTLSEntityAuthenticationtHandler.DefaultHttpClientContextLookupThe defaultHttpClientContextstrategy function, which resolves from theHttpClientRequestContextof the outboundMessageContextof the parentInOutOperationContext.
-
Field Summary
Fields Modifier and Type Field Description private Class<? extends org.opensaml.saml.common.messaging.context.AbstractAuthenticatableSAMLEntityContext>entityContextClassThe actual context class holding the authenticatable SAML entity.private org.opensaml.messaging.context.navigate.ContextDataLookupFunction<org.opensaml.messaging.context.MessageContext,String>entityIDLookupThe 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>httpClientContextLookupThe strategy function for resolving theto evaluate.private org.slf4j.LoggerlogLogger.
-
Constructor Summary
Constructors Constructor Description CheckAndRecordServerTLSEntityAuthenticationtHandler()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoInvoke(org.opensaml.messaging.context.MessageContext messageContext)voidsetEntityContextClass(Class<? extends org.opensaml.saml.common.messaging.context.AbstractAuthenticatableSAMLEntityContext> clazz)Set the class type holding the authenticatable SAML entity data.voidsetEntityIDLookup(org.opensaml.messaging.context.navigate.ContextDataLookupFunction<org.opensaml.messaging.context.MessageContext,String> strategy)Set the strategy function for resolving the authenticated entityID.voidsetHttpClientContextLookup(org.opensaml.messaging.context.navigate.ContextDataLookupFunction<org.opensaml.messaging.context.MessageContext,org.apache.http.client.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, setActivationCondition
-
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, doDestroy, doInitialize, initialize, isDestroyed, 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 theto 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.
-
-
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 theto 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:
doInvokein classorg.opensaml.messaging.handler.AbstractMessageHandler- Throws:
org.opensaml.messaging.handler.MessageHandlerException
-
-