Class SetResponseStatusCodeFromEvent
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
org.opensaml.profile.action.AbstractProfileAction
org.opensaml.profile.action.AbstractConditionalProfileAction
net.shibboleth.idp.profile.AbstractProfileAction
net.shibboleth.idp.plugin.oidc.op.profile.impl.SetResponseStatusCodeFromEvent
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent,ProfileAction,org.springframework.beans.factory.Aware,org.springframework.context.MessageSource,org.springframework.context.MessageSourceAware,org.springframework.webflow.execution.Action
This action reads an event from the configured
EventContext lookup strategy and sets the status code for
HttpServletResponse according to the attached configuration.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intThe status code for unmapped events.private Function<ProfileRequestContext,EventContext> Strategy function for access toEventContextto check.private final org.slf4j.LoggerClass logger.Map of eventIds to status codes. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoExecute(ProfileRequestContext profileRequestContext) voidsetDefaultCode(int code) Set the status code for unmapped events.voidSet lookup strategy forEventContextto check.voidsetMappedErrors(Map<String, Integer> errors) Set map of eventIds to status codes.Methods inherited from class net.shibboleth.idp.profile.AbstractProfileAction
doExecute, execute, getBean, getBean, getMessage, getMessage, getMessage, getParameter, getParameter, getProfileContextLookupStrategy, getRequestContext, getResult, setMessageSource, setProfileContextLookupStrategyMethods inherited from class org.opensaml.profile.action.AbstractConditionalProfileAction
doPreExecute, getActivationCondition, setActivationConditionMethods inherited from class org.opensaml.profile.action.AbstractProfileAction
doPostExecute, doPostExecute, ensureHttpServletRequest, ensureHttpServletResponse, execute, getHttpServletRequest, getHttpServletRequestSupplier, getHttpServletResponse, getHttpServletResponseSupplier, getLogPrefix, isPreExecuteCalled, setHttpServletRequestSupplier, setHttpServletResponseSupplierMethods 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 final org.slf4j.Logger logClass logger. -
eventContextLookupStrategy
Strategy function for access toEventContextto check. -
mappedErrors
Map of eventIds to status codes. -
defaultCode
private int defaultCodeThe status code for unmapped events.
-
-
Constructor Details
-
SetResponseStatusCodeFromEvent
public SetResponseStatusCodeFromEvent()Constructor.
-
-
Method Details
-
setEventContextLookupStrategy
public void setEventContextLookupStrategy(@Nonnull Function<ProfileRequestContext, EventContext> strategy) Set lookup strategy forEventContextto check.- Parameters:
strategy- lookup strategy
-
setDefaultCode
public void setDefaultCode(int code) Set the status code for unmapped events.- Parameters:
code- The status code for unmapped events.
-
setMappedErrors
Set map of eventIds to status codes.- Parameters:
errors- map of eventIds to status codes.
-
doExecute
- Overrides:
doExecutein classAbstractProfileAction
-