Class InitializeDPoPProofContext
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<Request>
net.shibboleth.idp.plugin.oidc.op.oauth2.profile.impl.InitializeDPoPProofContext
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent,ProfileAction,Aware,MessageSource,MessageSourceAware,Action
Action that stores DPoP proof JWT to
OAuth2DPoPProofContext. The value is extracted from the HTTP request
header. If the DPoP-header contains a value, this action verifies that it's a single SignedJWT value as mandated by
the specification.- Since:
- 4.2.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate 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 DPoP proofs. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected 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.protected StringgetSingleValueOrNull(Enumeration<String> enumeration) Returns the value from given enumeration if only single value exists, null otherwise.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 DPoP proofs.Methods 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. -
requireDpopProofCondition
Predicate for enforcing the use of DPoP proofs. -
objectMapper
Object mapper used for pretty-printing JWT contents.
-
-
Constructor Details
-
InitializeDPoPProofContext
public InitializeDPoPProofContext()
-
-
Method Details
-
setRequireDpopProofCondition
Set the predicate for enforcing the use of DPoP proofs.- Parameters:
predicate- the predicate for enforcing the use of DPoP proofs
-
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.
-
doInitialize
- Overrides:
doInitializein classAbstractInitializableComponent- Throws:
ComponentInitializationException
-
doPreExecute
- Overrides:
doPreExecutein classAbstractOIDCRequestAction<Request>
-
doExecute
- Overrides:
doExecutein classAbstractProfileAction
-
getSingleValueOrNull
Returns the value from given enumeration if only single value exists, null otherwise.- Parameters:
enumeration- the input enumeration- Returns:
- the single value if exists, null otherwise
-
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
-