Class BuildAuthenticationErrorResponseFromEvent
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.AbstractBuildErrorResponseFromEvent<com.nimbusds.openid.connect.sdk.AuthenticationErrorResponse,AuthorizationErrorObjectMapping>
net.shibboleth.idp.plugin.oidc.op.profile.impl.BuildAuthenticationErrorResponseFromEvent
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent,ProfileAction,Aware,MessageSource,MessageSourceAware,Action
public class BuildAuthenticationErrorResponseFromEvent
extends AbstractBuildErrorResponseFromEvent<com.nimbusds.openid.connect.sdk.AuthenticationErrorResponse,AuthorizationErrorObjectMapping>
This action reads an event from the configured
EventContext lookup strategy, constructs an OIDC
authentication error response message and attaches it as the outbound message.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Predicate<ProfileRequestContext>Predicate to signal whether or not to include iss-parameter to the response.private com.nimbusds.oauth2.sdk.id.IssuerIssuer value to included in the response message, if configured to be included.private Function<ProfileRequestContext,String> Strategy used to obtain the response issuer value.private org.slf4j.LoggerClass logger.private Function<ProfileRequestContext,com.nimbusds.oauth2.sdk.ResponseMode> Lookup strategy for fetching the requested response mode.private Function<ProfileRequestContext,com.nimbusds.oauth2.sdk.ResponseType> Lookup strategy for fetching the requested response type.private Function<ProfileRequestContext,com.nimbusds.oauth2.sdk.id.State> Lookup strategy for fetching the requested state.Fields inherited from class net.shibboleth.idp.plugin.oidc.op.profile.impl.AbstractBuildErrorResponseFromEvent
DEFAULT_ERROR_CODE, DEFAULT_HTTP_STATUS_CODE -
Constructor Summary
ConstructorsConstructorDescriptionConstructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected com.nimbusds.openid.connect.sdk.AuthenticationErrorResponsebuildErrorResponse(com.nimbusds.oauth2.sdk.ErrorObject error, ProfileRequestContext profileRequestContext) Method implemented by the extending class to create ErrorResponse.protected voidprotected booleandoPreExecute(ProfileRequestContext profileRequestContext) voidSet the predicate to signal whether or not to include iss-parameter to the response.voidSet the strategy used to locate the issuer value to use.voidsetRequestedResponseModeLookupStrategy(Function<ProfileRequestContext, com.nimbusds.oauth2.sdk.ResponseMode> strategy) Set the lookup strategy for fetching the requested response mode.voidsetRequestedResponseTypeLookupStrategy(Function<ProfileRequestContext, com.nimbusds.oauth2.sdk.ResponseType> strategy) Set the lookup strategy for fetching the requested response type.voidsetRequestedStateLookupStrategy(Function<ProfileRequestContext, com.nimbusds.oauth2.sdk.id.State> strategy) Set the lookup strategy for fetching the requested state.Methods inherited from class net.shibboleth.idp.plugin.oidc.op.profile.impl.AbstractBuildErrorResponseFromEvent
doExecute, setDefaultCode, setDefaultStatusCode, setEventContextLookupStrategy, setMappedErrorsMethods 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
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, 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 org.slf4j.Logger logClass logger. -
issuerLookupStrategy
Strategy used to obtain the response issuer value. -
includeIssuerInResponsePredicate
Predicate to signal whether or not to include iss-parameter to the response. -
requestedResponseModeLookupStrategy
@NonnullAfterInit private Function<ProfileRequestContext,com.nimbusds.oauth2.sdk.ResponseMode> requestedResponseModeLookupStrategyLookup strategy for fetching the requested response mode. -
requestedStateLookupStrategy
@NonnullAfterInit private Function<ProfileRequestContext,com.nimbusds.oauth2.sdk.id.State> requestedStateLookupStrategyLookup strategy for fetching the requested state. -
requestedResponseTypeLookupStrategy
@NonnullAfterInit private Function<ProfileRequestContext,com.nimbusds.oauth2.sdk.ResponseType> requestedResponseTypeLookupStrategyLookup strategy for fetching the requested response type. -
issuer
private com.nimbusds.oauth2.sdk.id.Issuer issuerIssuer value to included in the response message, if configured to be included.
-
-
Constructor Details
-
BuildAuthenticationErrorResponseFromEvent
@Autowired public BuildAuthenticationErrorResponseFromEvent(@Nullable Collection<AuthorizationErrorObjectMapping> freeObjects) Constructor.- Parameters:
freeObjects- free-standing objects to add
-
-
Method Details
-
setIssuerLookupStrategy
Set the strategy used to locate the issuer value to use.- Parameters:
strategy- what to set
-
setIncludeIssuerInResponsePredicate
public void setIncludeIssuerInResponsePredicate(@Nonnull Predicate<ProfileRequestContext> predicate) Set the predicate to signal whether or not to include iss-parameter to the response.- Parameters:
predicate- what to set
-
setRequestedResponseModeLookupStrategy
public void setRequestedResponseModeLookupStrategy(@Nonnull Function<ProfileRequestContext, com.nimbusds.oauth2.sdk.ResponseMode> strategy) Set the lookup strategy for fetching the requested response mode.- Parameters:
strategy- What to set.
-
setRequestedStateLookupStrategy
public void setRequestedStateLookupStrategy(@Nonnull Function<ProfileRequestContext, com.nimbusds.oauth2.sdk.id.State> strategy) Set the lookup strategy for fetching the requested state.- Parameters:
strategy- What to set.
-
setRequestedResponseTypeLookupStrategy
public void setRequestedResponseTypeLookupStrategy(@Nonnull Function<ProfileRequestContext, com.nimbusds.oauth2.sdk.ResponseType> strategy) Set the lookup strategy for fetching the requested response type.- Parameters:
strategy- What to set.
-
doInitialize
- Overrides:
doInitializein classAbstractInitializableComponent- Throws:
ComponentInitializationException
-
doPreExecute
- Overrides:
doPreExecutein classAbstractBuildErrorResponseFromEvent<com.nimbusds.openid.connect.sdk.AuthenticationErrorResponse,AuthorizationErrorObjectMapping>
-
buildErrorResponse
protected com.nimbusds.openid.connect.sdk.AuthenticationErrorResponse buildErrorResponse(com.nimbusds.oauth2.sdk.ErrorObject error, ProfileRequestContext profileRequestContext) Method implemented by the extending class to create ErrorResponse.- Specified by:
buildErrorResponsein classAbstractBuildErrorResponseFromEvent<com.nimbusds.openid.connect.sdk.AuthenticationErrorResponse,AuthorizationErrorObjectMapping> - Parameters:
error- error object to build the response from.profileRequestContext- profile request context.- Returns:
- ErrorResponse
-