Class SetConsentToResponseContext
- 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.AbstractOIDCResponseAction
-
- net.shibboleth.idp.plugin.oidc.op.profile.impl.SetConsentToResponseContext
-
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent,ProfileAction,Aware,MessageSource,MessageSourceAware,Action
public class SetConsentToResponseContext extends AbstractOIDCResponseAction
Action that checks for adds the currently existing attributes fromAttributeContextfor token delivery. They are assumed to be consented, if they exist in the context. The (consent) information is stored toOIDCAuthenticationResponseTokenClaimsContextthat is created underOIDCAuthenticationResponseContext.
-
-
Field Summary
Fields Modifier and Type Field Description private Function<ProfileRequestContext,net.shibboleth.idp.attribute.context.AttributeContext>attributeContextLookupStrategyStrategy used to locate theAttributeContextassociated with a givenProfileRequestContext.private net.shibboleth.idp.attribute.context.AttributeContextattributeCtxAttributeContext to use.private Predicate<ProfileRequestContext>consentEnabledPredicatePredicate used to check if consent is enabled.private Predicate<ProfileRequestContext>encodeConsentPredicatePredicate used to check if consent should be embedded in tokens.private org.slf4j.LoggerlogClass logger.
-
Constructor Summary
Constructors Constructor Description SetConsentToResponseContext()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoExecute(ProfileRequestContext profileRequestContext)protected booleandoPreExecute(ProfileRequestContext profileRequestContext)voidsetAttributeContextLookupStrategy(Function<ProfileRequestContext,net.shibboleth.idp.attribute.context.AttributeContext> strategy)Set the strategy used to locate theAttributeContextassociated with a givenProfileRequestContext.voidsetConsentEnabledPredicate(Predicate<ProfileRequestContext> predicate)Set the predicate used to check if consent is enable.voidsetEncodeConsentPredicate(Predicate<ProfileRequestContext> predicate)Set the predicate used to check if consent should be encoded.-
Methods inherited from class net.shibboleth.idp.plugin.oidc.op.profile.impl.AbstractOIDCResponseAction
getMetadataContext, getOidcResponseContext
-
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
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 org.slf4j.Logger log
Class logger.
-
attributeContextLookupStrategy
@Nonnull private Function<ProfileRequestContext,net.shibboleth.idp.attribute.context.AttributeContext> attributeContextLookupStrategy
Strategy used to locate theAttributeContextassociated with a givenProfileRequestContext.
-
consentEnabledPredicate
@Nonnull private Predicate<ProfileRequestContext> consentEnabledPredicate
Predicate used to check if consent is enabled.
-
encodeConsentPredicate
@Nonnull private Predicate<ProfileRequestContext> encodeConsentPredicate
Predicate used to check if consent should be embedded in tokens.
-
attributeCtx
@Nullable private net.shibboleth.idp.attribute.context.AttributeContext attributeCtx
AttributeContext to use.
-
-
Method Detail
-
setAttributeContextLookupStrategy
public void setAttributeContextLookupStrategy(@Nonnull Function<ProfileRequestContext,net.shibboleth.idp.attribute.context.AttributeContext> strategy)Set the strategy used to locate theAttributeContextassociated with a givenProfileRequestContext.- Parameters:
strategy- strategy used to locate theAttributeContextassociated with a givenProfileRequestContext
-
setConsentEnabledPredicate
public void setConsentEnabledPredicate(@Nonnull Predicate<ProfileRequestContext> predicate)Set the predicate used to check if consent is enable.- Parameters:
predicate- predicate used to check if consent is enabled
-
setEncodeConsentPredicate
public void setEncodeConsentPredicate(@Nonnull Predicate<ProfileRequestContext> predicate)Set the predicate used to check if consent should be encoded.- Parameters:
predicate- predicate used to check if consent should be encoded
-
doPreExecute
protected boolean doPreExecute(@Nonnull ProfileRequestContext profileRequestContext)- Overrides:
doPreExecutein classAbstractOIDCResponseAction
-
doExecute
protected void doExecute(@Nonnull ProfileRequestContext profileRequestContext)- Overrides:
doExecutein classAbstractProfileAction
-
-