Class SetTokenDeliveryAttributesToResponseContext
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.AbstractOIDCResponseAction
net.shibboleth.idp.plugin.oidc.op.profile.impl.SetTokenDeliveryAttributesToResponseContext
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent,ProfileAction,org.springframework.beans.factory.Aware,org.springframework.context.MessageSource,org.springframework.context.MessageSourceAware,org.springframework.webflow.execution.Action
Action that checks for any released attributes marked for token delivery. For such attributes
OIDCAuthenticationResponseTokenClaimsContext is created under OIDCAuthenticationResponseContext and
the marked attributes are placed there.-
Field Summary
FieldsModifier and TypeFieldDescriptionAttributes to include in ID token no matter what.private Function<ProfileRequestContext,Set<String>> Strategy used to obtain the set of attribute IDs to include in the ID token in all cases.Strategy used to locate theAttributeContextassociated with a givenProfileRequestContext.private AttributeContextAttributeContext to use.Attributes to omit from UserInfo token.private Function<ProfileRequestContext,Set<String>> Strategy used to obtain the set of attribute IDs to omit from the UserInfo token.Attributes to encode for recovery.private Function<ProfileRequestContext,Set<String>> Strategy used to obtain the set of attribute IDs to encode for back-channel recovery.private booleanWhether attributes that result in anAttributeEncodingExceptionwhen being encoded should be ignored or result in anIdPEventIds.UNABLE_ENCODE_ATTRIBUTEtransition.private org.slf4j.LoggerClass logger.Transcoder registry service object. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoExecute(ProfileRequestContext profileRequestContext) protected voidprotected booleandoPreExecute(ProfileRequestContext profileRequestContext) private voidencodeAttribute(AttributeTranscoderRegistry registry, ProfileRequestContext profileRequestContext, IdPAttribute attribute) Access the registry of transcoding rules to transform the input attribute into claims.voidSet the strategy used to obtain the set of attribute IDs always included in ID tokens.voidSet the strategy used to locate theAttributeContextassociated with a givenProfileRequestContext.voidSet the strategy used to obtain the set of attribute IDs to omit from UserInfo tokens.voidSet the strategy used to obtain the set of attribute IDs to encode for back-channel recovery.voidsetIgnoringUnencodableAttributes(boolean flag) Set whether the attributes that result in anAttributeEncodingExceptionwhen being encoded should be ignored or result in anIdPEventIds.UNABLE_ENCODE_ATTRIBUTEtransition.voidSets the registry of transcoding rules to apply to encode attributes.Methods inherited from class net.shibboleth.idp.plugin.oidc.op.profile.impl.AbstractOIDCResponseAction
getMetadataContext, getOidcResponseContextMethods 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. -
attributeContextLookupStrategy
Strategy used to locate theAttributeContextassociated with a givenProfileRequestContext. -
encodedAttributesLookupStrategy
Strategy used to obtain the set of attribute IDs to encode for back-channel recovery. -
alwaysIncludedAttributesLookupStrategy
Strategy used to obtain the set of attribute IDs to include in the ID token in all cases. -
deniedUserInfoAttributesLookupStrategy
Strategy used to obtain the set of attribute IDs to omit from the UserInfo token. -
transcoderRegistry
Transcoder registry service object. -
ignoringUnencodableAttributes
private boolean ignoringUnencodableAttributesWhether attributes that result in anAttributeEncodingExceptionwhen being encoded should be ignored or result in anIdPEventIds.UNABLE_ENCODE_ATTRIBUTEtransition. -
attributeCtx
AttributeContext to use. -
encodedAttributes
Attributes to encode for recovery. -
alwaysIncludedAttributes
Attributes to include in ID token no matter what. -
deniedUserInfoAttributes
Attributes to omit from UserInfo token.
-
-
Constructor Details
-
SetTokenDeliveryAttributesToResponseContext
SetTokenDeliveryAttributesToResponseContext()Constructor.
-
-
Method Details
-
setIgnoringUnencodableAttributes
public void setIgnoringUnencodableAttributes(boolean flag) Set whether the attributes that result in anAttributeEncodingExceptionwhen being encoded should be ignored or result in anIdPEventIds.UNABLE_ENCODE_ATTRIBUTEtransition.- Parameters:
flag- flag to set
-
setAttributeContextLookupStrategy
public void setAttributeContextLookupStrategy(@Nonnull Function<ProfileRequestContext, AttributeContext> strategy) Set the strategy used to locate theAttributeContextassociated with a givenProfileRequestContext.- Parameters:
strategy- strategy used to locate theAttributeContextassociated with a givenProfileRequestContext
-
setEncodedAttributesLookupStrategy
public void setEncodedAttributesLookupStrategy(@Nonnull Function<ProfileRequestContext, Set<String>> strategy) Set the strategy used to obtain the set of attribute IDs to encode for back-channel recovery.- Parameters:
strategy- lookup strategy
-
setAlwaysIncludedAttributesLookupStrategy
public void setAlwaysIncludedAttributesLookupStrategy(@Nonnull Function<ProfileRequestContext, Set<String>> strategy) Set the strategy used to obtain the set of attribute IDs always included in ID tokens.- Parameters:
strategy- lookup strategy
-
setDeniedUserInfoAttributesLookupStrategy
public void setDeniedUserInfoAttributesLookupStrategy(@Nonnull Function<ProfileRequestContext, Set<String>> strategy) Set the strategy used to obtain the set of attribute IDs to omit from UserInfo tokens.- Parameters:
strategy- lookup strategy
-
doInitialize
- Overrides:
doInitializein classAbstractInitializableComponent- Throws:
ComponentInitializationException
-
doPreExecute
- Overrides:
doPreExecutein classAbstractOIDCResponseAction
-
doExecute
- Overrides:
doExecutein classAbstractProfileAction
-
encodeAttribute
private void encodeAttribute(@Nonnull AttributeTranscoderRegistry registry, @Nonnull ProfileRequestContext profileRequestContext, @Nonnull IdPAttribute attribute) throws AttributeEncodingException Access the registry of transcoding rules to transform the input attribute into claims.- Parameters:
registry- registry of transcoding rulesprofileRequestContext- current profile request contextattribute- input attribute- Throws:
AttributeEncodingException- if a non-ignorable error occurs