Class AbstractLogoutRequestParameterValueMessageHandler<T>
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
org.opensaml.messaging.handler.AbstractMessageHandler
net.shibboleth.sp.oidc.profile.impl.AbstractLogoutRequestParameterValueMessageHandler<T>
- Type Parameters:
T- the logout request parameter value type TODO: move to commons
- All Implemented Interfaces:
net.shibboleth.shared.component.Component,net.shibboleth.shared.component.DestructableComponent,net.shibboleth.shared.component.InitializableComponent,org.opensaml.messaging.handler.MessageHandler
public abstract class AbstractLogoutRequestParameterValueMessageHandler<T>
extends org.opensaml.messaging.handler.AbstractMessageHandler
Base class for message handlers that process and apply values of OpenID Connect logout requests.
This abstract class provides common functionality for locating:
- the
OIDCLogoutRequestassociated with the currentMessageContext, - the
OIDCProviderMetadatadescribing the peer OpenID Provider, - and the parameter value to be extracted and validated against the expected Java type.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate net.shibboleth.oidc.profile.core.OIDCLogoutRequestThe stashedOIDCLogoutRequest.private Function<org.opensaml.messaging.context.MessageContext,net.shibboleth.oidc.profile.core.OIDCLogoutRequest> Strategy used to locate theOIDCLogoutRequest.Lookup strategy for parameter value.protected static final org.opensaml.profile.context.navigate.ParentProfileRequestContextLookup<org.opensaml.messaging.context.MessageContext>Lookup function for parent ProfileRequestContext.private com.nimbusds.openid.connect.sdk.op.OIDCProviderMetadataThe stashed OpenID Provider metadata .private Function<org.opensaml.messaging.context.MessageContext,net.shibboleth.oidc.metadata.context.OIDCProviderMetadataContext> Lookup strategy to locate the OpenID Provider metadata to use.The logout request parameter value type. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractLogoutRequestParameterValueMessageHandler(Class<T> valueType) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected booleandoPreInvoke(org.opensaml.messaging.context.MessageContext messageContext) protected net.shibboleth.oidc.profile.core.OIDCLogoutRequestGet the logout request.protected TgetParameterValue(org.opensaml.messaging.context.MessageContext context) Retrieves the parameter value or configuration options from the configured lookup strategy, verifying at runtime that the result matches the type expected by the subclass.protected com.nimbusds.openid.connect.sdk.op.OIDCProviderMetadataReturns the OpenID Provider metadata.voidsetLogoutRequestLookupStrategy(Function<org.opensaml.messaging.context.MessageContext, net.shibboleth.oidc.profile.core.OIDCLogoutRequest> strategy) Set the strategy used to locate theOIDCLogoutRequestto use.voidsetParameterValueLookupStrategy(Function<org.opensaml.messaging.context.MessageContext, T> strategy) Set the parameter value lookup strategy used to find the value to set onto the logout request.voidsetProviderMetadataLookupStrategy(Function<org.opensaml.messaging.context.MessageContext, net.shibboleth.oidc.metadata.context.OIDCProviderMetadataContext> strategy) Set the lookup strategy to locate the OpenID providers metadata.Methods inherited from class org.opensaml.messaging.handler.AbstractMessageHandler
doInvoke, doPostInvoke, doPostInvoke, getActivationCondition, getLogPrefix, invoke, isPreInvokeCalled, setActivationConditionMethods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, doDestroy, 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
-
PRC_LOOKUP
@Nonnull protected static final org.opensaml.profile.context.navigate.ParentProfileRequestContextLookup<org.opensaml.messaging.context.MessageContext> PRC_LOOKUPLookup function for parent ProfileRequestContext. -
logoutRequestLookupStrategy
@NonnullAfterInit private Function<org.opensaml.messaging.context.MessageContext,net.shibboleth.oidc.profile.core.OIDCLogoutRequest> logoutRequestLookupStrategyStrategy used to locate theOIDCLogoutRequest. -
providerMetadataLookupStrategy
@NonnullAfterInit private Function<org.opensaml.messaging.context.MessageContext,net.shibboleth.oidc.metadata.context.OIDCProviderMetadataContext> providerMetadataLookupStrategyLookup strategy to locate the OpenID Provider metadata to use. -
parameterValueLookupStrategy
@Nullable private Function<org.opensaml.messaging.context.MessageContext,T> parameterValueLookupStrategyLookup strategy for parameter value. -
type
The logout request parameter value type. -
logoutRequest
@NonnullBeforeExec private net.shibboleth.oidc.profile.core.OIDCLogoutRequest logoutRequestThe stashedOIDCLogoutRequest. -
providerMetadata
@NonnullBeforeExec private com.nimbusds.openid.connect.sdk.op.OIDCProviderMetadata providerMetadataThe stashed OpenID Provider metadata .
-
-
Constructor Details
-
AbstractLogoutRequestParameterValueMessageHandler
Constructor.- Parameters:
valueType- type of value returned by handler
-
-
Method Details
-
doInitialize
protected void doInitialize() throws net.shibboleth.shared.component.ComponentInitializationException- Overrides:
doInitializein classnet.shibboleth.shared.component.AbstractInitializableComponent- Throws:
net.shibboleth.shared.component.ComponentInitializationException
-
getLogoutRequest
@NonnullBeforeExec protected net.shibboleth.oidc.profile.core.OIDCLogoutRequest getLogoutRequest()Get the logout request.- Returns:
- the logout request
-
setProviderMetadataLookupStrategy
public void setProviderMetadataLookupStrategy(@Nonnull Function<org.opensaml.messaging.context.MessageContext, net.shibboleth.oidc.metadata.context.OIDCProviderMetadataContext> strategy) Set the lookup strategy to locate the OpenID providers metadata.- Parameters:
strategy- the strategy.
-
getProviderMetadata
@NonnullBeforeExec protected com.nimbusds.openid.connect.sdk.op.OIDCProviderMetadata getProviderMetadata()Returns the OpenID Provider metadata. Should never benullafterdoPreExecutehas been called.- Returns:
- The provider metadata context.
-
setParameterValueLookupStrategy
public void setParameterValueLookupStrategy(@Nonnull Function<org.opensaml.messaging.context.MessageContext, T> strategy) Set the parameter value lookup strategy used to find the value to set onto the logout request.- Parameters:
strategy- The parameter value lookup strategy to set.
-
getParameterValue
@Nullable protected T getParameterValue(@Nonnull org.opensaml.messaging.context.MessageContext context) throws org.opensaml.messaging.handler.MessageHandlerException Retrieves the parameter value or configuration options from the configured lookup strategy, verifying at runtime that the result matches the type expected by the subclass.- Parameters:
context- the message context to pass to the lookup function- Returns:
- the parameter value
- Throws:
org.opensaml.messaging.handler.MessageHandlerException- if the value is not the expected type
-
setLogoutRequestLookupStrategy
public void setLogoutRequestLookupStrategy(@Nonnull Function<org.opensaml.messaging.context.MessageContext, net.shibboleth.oidc.profile.core.OIDCLogoutRequest> strategy) Set the strategy used to locate theOIDCLogoutRequestto use.- Parameters:
strategy- lookup strategy
-
doPreInvoke
protected boolean doPreInvoke(@Nonnull org.opensaml.messaging.context.MessageContext messageContext) throws org.opensaml.messaging.handler.MessageHandlerException - Overrides:
doPreInvokein classorg.opensaml.messaging.handler.AbstractMessageHandler- Throws:
org.opensaml.messaging.handler.MessageHandlerException
-