Class SetRequestObjectToResponseContext
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.AbstractOIDCRequestAction<AuthorizationRequest>
net.shibboleth.idp.plugin.oidc.op.oauth2.profile.impl.AbstractOAuthAuthorizationRequestAction
net.shibboleth.idp.plugin.oidc.op.oauth2.profile.impl.AbstractOAuthAuthorizationResponseAction
net.shibboleth.idp.plugin.oidc.op.oauth2.profile.impl.SetRequestObjectToResponseContext
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent,ProfileAction,Aware,MessageSource,MessageSourceAware,Action
Action that stored request object to
OIDCAuthenticationResponseContext. The request
object may be given by value with request parameter or by reference with request_uri parameter.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate org.apache.hc.client5.http.classic.HttpClientHTTP Client used to post the data.private HttpClientSecurityParametersHTTP client security parameters.private org.slf4j.LoggerClass logger.private com.fasterxml.jackson.databind.ObjectMapperObject mapper used for pretty-printing JWT contents.private org.slf4j.LoggerUsed to log protocol messages.private Predicate<ProfileRequestContext>Predicate for enforcing the use of pushed authorization requests.private List<BiFunction<ProfileRequestContext,URI, Map<String, Object>>> List of deserializers for OP-issued request_uri values.private Predicate<ProfileRequestContext>Predicate for enforcing the use of request objects.private booleanWhether to require pushed authorization request to be used. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate org.apache.hc.client5.http.protocol.HttpClientContextbuildHttpContext(org.apache.hc.core5.http.ClassicHttpRequest request) Build theHttpClientContextinstance to be used by the HttpClient.protected voiddoExecute(ProfileRequestContext profileRequestContext) protected voidprotected booleandoPreExecute(ProfileRequestContext profileRequestContext) protected voiddoProtocolLog(ProfileRequestContext profileRequestContext, JWT jwt, String messagePrefix) Create a protocol message containing the pretty-printed contents of the given JWT.voidsetHttpClient(org.apache.hc.client5.http.classic.HttpClient client) Set theHttpClientto use.voidSet the optional client security parameters.voidsetObjectMapper(com.fasterxml.jackson.databind.ObjectMapper mapper) Set the object mapper used for pretty-printing JWT contents.voidSet the predicate for enforcing the use of pushed authorization requests.voidsetPushedAuthorizationRequestUriDeserializers(List<BiFunction<ProfileRequestContext, URI, Map<String, Object>>> deserializers) Set the list of deserializers for OP-issued request_uri values.voidSet the predicate for enforcing the use of request objects.Methods inherited from class net.shibboleth.idp.plugin.oidc.op.oauth2.profile.impl.AbstractOAuthAuthorizationResponseAction
getMetadataContext, getOidcResponseContextMethods inherited from class net.shibboleth.idp.plugin.oidc.op.oauth2.profile.impl.AbstractOAuthAuthorizationRequestAction
getAuthorizationRequestMethods inherited from class net.shibboleth.idp.plugin.oidc.op.profile.impl.AbstractOIDCRequestAction
getRequestMethods 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. -
protocolMessageLog
@Nonnull private org.slf4j.Logger protocolMessageLogUsed to log protocol messages. -
httpClient
HTTP Client used to post the data. -
httpClientSecurityParameters
HTTP client security parameters. -
requestObjectEnforcedPredicate
Predicate for enforcing the use of request objects. -
pushedAuthorizationRequestEnforcedPredicate
@NonnullAfterInit private Predicate<ProfileRequestContext> pushedAuthorizationRequestEnforcedPredicatePredicate for enforcing the use of pushed authorization requests. -
objectMapper
Object mapper used for pretty-printing JWT contents. -
pushedAuthorizationRequestUriDeserializers
@Nonnull private List<BiFunction<ProfileRequestContext,URI, pushedAuthorizationRequestUriDeserializersMap<String, Object>>> List of deserializers for OP-issued request_uri values. -
requirePushedAuthorization
private boolean requirePushedAuthorizationWhether to require pushed authorization request to be used.
-
-
Constructor Details
-
SetRequestObjectToResponseContext
public SetRequestObjectToResponseContext()Constructor.
-
-
Method Details
-
setHttpClient
public void setHttpClient(@Nonnull org.apache.hc.client5.http.classic.HttpClient client) Set theHttpClientto use.- Parameters:
client- client to use
-
setHttpClientSecurityParameters
Set the optional client security parameters.- Parameters:
params- the new client security parameters
-
setRequestObjectEnforcedPredicate
Set the predicate for enforcing the use of request objects.- Parameters:
predicate- the predicate for enforcing the use of request objects
-
setPushedAuthorizationRequestEnforcedPredicate
public void setPushedAuthorizationRequestEnforcedPredicate(@Nonnull Predicate<ProfileRequestContext> predicate) Set the predicate for enforcing the use of pushed authorization requests.- Parameters:
predicate- the predicate for enforcing the use of pushed authorization requests- Since:
- 4.2.0
-
setObjectMapper
public void setObjectMapper(@Nonnull com.fasterxml.jackson.databind.ObjectMapper mapper) Set the object mapper used for pretty-printing JWT contents.- Parameters:
mapper- What to set.- Since:
- 4.1.0
-
setPushedAuthorizationRequestUriDeserializers
public void setPushedAuthorizationRequestUriDeserializers(@Nonnull List<BiFunction<ProfileRequestContext, URI, Map<String, Object>>> deserializers) Set the list of deserializers for OP-issued request_uri values.- Parameters:
deserializers- What to set.- Since:
- 4.2.0
-
buildHttpContext
@Nonnull private org.apache.hc.client5.http.protocol.HttpClientContext buildHttpContext(@Nonnull org.apache.hc.core5.http.ClassicHttpRequest request) Build theHttpClientContextinstance to be used by the HttpClient.- Parameters:
request- the HTTP client request- Returns:
- the client context instance
-
doInitialize
- Overrides:
doInitializein classAbstractInitializableComponent- Throws:
ComponentInitializationException
-
doPreExecute
- Overrides:
doPreExecutein classAbstractOAuthAuthorizationResponseAction
-
doExecute
- Overrides:
doExecutein classAbstractProfileAction
-
doProtocolLog
protected void doProtocolLog(@Nonnull ProfileRequestContext profileRequestContext, @Nonnull JWT jwt, @Nonnull String messagePrefix) Create a protocol message containing the pretty-printed contents of the given JWT.- Parameters:
profileRequestContext- Profile request context where to publish possible error eventjwt- The token to be loggedmessagePrefix- The prefix for the protocol log message
-