Class SetResponseStatusCodeFromEvent
- java.lang.Object
-
- net.shibboleth.utilities.java.support.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,Aware,MessageSource,MessageSourceAware,Action
public class SetResponseStatusCodeFromEvent extends net.shibboleth.idp.profile.AbstractProfileActionThis action reads an event from the configuredEventContextlookup strategy and sets the status code forHttpServletResponseaccording to the attached configuration.
-
-
Field Summary
Fields Modifier and Type Field Description private intdefaultCodeThe status code for unmapped events.private Function<ProfileRequestContext,EventContext>eventContextLookupStrategyStrategy function for access toEventContextto check.private org.slf4j.LoggerlogClass logger.private Map<String,Integer>mappedErrorsMap of eventIds to status codes.
-
Constructor Summary
Constructors Constructor Description SetResponseStatusCodeFromEvent()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoExecute(ProfileRequestContext profileRequestContext)voidsetDefaultCode(int code)Set the status code for unmapped events.voidsetEventContextLookupStrategy(Function<ProfileRequestContext,EventContext> strategy)Set 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, getMessage, getMessage, getMessage, getProfileContextLookupStrategy, getRequestContext, getResult, setMessageSource, setProfileContextLookupStrategy
-
Methods inherited from class org.opensaml.profile.action.AbstractConditionalProfileAction
doPreExecute, getActivationCondition, setActivationCondition
-
Methods inherited from class org.opensaml.profile.action.AbstractProfileAction
doPostExecute, doPostExecute, execute, getHttpServletRequest, getHttpServletResponse, getLogPrefix, setHttpServletRequest, setHttpServletResponse
-
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
@Nonnull private final org.slf4j.Logger log
Class logger.
-
eventContextLookupStrategy
@Nonnull private Function<ProfileRequestContext,EventContext> eventContextLookupStrategy
Strategy function for access toEventContextto check.
-
defaultCode
private int defaultCode
The status code for unmapped events.
-
-
Method Detail
-
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
public void setMappedErrors(@Nonnull Map<String,Integer> errors)Set map of eventIds to status codes.- Parameters:
errors- map of eventIds to status codes.
-
doExecute
protected void doExecute(@Nonnull ProfileRequestContext profileRequestContext)- Overrides:
doExecutein classAbstractProfileAction
-
-