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:
Component
,DestructableComponent
,InitializableComponent
,MessageHandler
public class CheckAndRecordServerTLSEntityAuthenticationtHandler extends AbstractMessageHandler
Handler implementation that checks and records the result ofHttpClient
server TLS authentication as stored in the @linkHttpClientContext
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 Classes Modifier and Type Class Description class
CheckAndRecordServerTLSEntityAuthenticationtHandler.DefaultHttpClientContextLookup
The defaultHttpClientContext
strategy function, which resolves from theHttpClientRequestContext
of the outboundMessageContext
of the parentInOutOperationContext
.
-
Field Summary
Fields Modifier and Type Field Description private Class<? extends AbstractAuthenticatableSAMLEntityContext>
entityContextClass
The actual context class holding the authenticatable SAML entity.private ContextDataLookupFunction<MessageContext,String>
entityIDLookup
The strategy function for resolving the authenticated entityID.private ContextDataLookupFunction<MessageContext,org.apache.http.client.protocol.HttpClientContext>
httpClientContextLookup
The strategy function for resolving theto evaluate
.private org.slf4j.Logger
log
Logger.
-
Constructor Summary
Constructors Constructor Description CheckAndRecordServerTLSEntityAuthenticationtHandler()
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doInvoke(MessageContext messageContext)
void
setEntityContextClass(Class<? extends AbstractAuthenticatableSAMLEntityContext> clazz)
Set the class type holding the authenticatable SAML entity data.void
setEntityIDLookup(ContextDataLookupFunction<MessageContext,String> strategy)
Set the strategy function for resolving the authenticated entityID.void
setHttpClientContextLookup(ContextDataLookupFunction<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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
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 ContextDataLookupFunction<MessageContext,org.apache.http.client.protocol.HttpClientContext> httpClientContextLookup
The strategy function for resolving theto evaluate
.
-
entityIDLookup
@Nonnull private ContextDataLookupFunction<MessageContext,String> entityIDLookup
The strategy function for resolving the authenticated entityID.
-
entityContextClass
@Nonnull private Class<? extends AbstractAuthenticatableSAMLEntityContext> entityContextClass
The actual context class holding the authenticatable SAML entity.
-
-
Method Detail
-
setHttpClientContextLookup
public void setHttpClientContextLookup(@Nonnull ContextDataLookupFunction<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 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 ContextDataLookupFunction<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 MessageContext messageContext) throws MessageHandlerException
- Specified by:
doInvoke
in classAbstractMessageHandler
- Throws:
MessageHandlerException
-
-