Class SetTokenDeliveryAttributesToResponseContext
- 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.SetTokenDeliveryAttributesToResponseContext
-
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent,ProfileAction,Aware,MessageSource,MessageSourceAware,Action
public class SetTokenDeliveryAttributesToResponseContext extends AbstractOIDCResponseAction
Action that checks for any released attributes marked for token delivery. For such attributesOIDCAuthenticationResponseTokenClaimsContextis created underOIDCAuthenticationResponseContextand the marked attributes are placed there.
-
-
Field Summary
Fields Modifier and Type Field Description private Set<String>alwaysIncludedAttributesAttributes to include in ID token no matter what.private Function<ProfileRequestContext,Set<String>>alwaysIncludedAttributesLookupStrategyStrategy used to obtain the set of attribute IDs to include in the ID token in all cases.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 Set<String>deniedUserInfoAttributesAttributes to omit from UserInfo token.private Function<ProfileRequestContext,Set<String>>deniedUserInfoAttributesLookupStrategyStrategy used to obtain the set of attribute IDs to omit from the UserInfo token.private Set<String>encodedAttributesAttributes to encode for recovery.private Function<ProfileRequestContext,Set<String>>encodedAttributesLookupStrategyStrategy used to obtain the set of attribute IDs to encode for back-channel recovery.private booleanignoringUnencodableAttributesWhether attributes that result in anAttributeEncodingExceptionwhen being encoded should be ignored or result in anIdPEventIds.UNABLE_ENCODE_ATTRIBUTEtransition.private org.slf4j.LoggerlogClass logger.private ReloadableService<net.shibboleth.idp.attribute.transcoding.AttributeTranscoderRegistry>transcoderRegistryTranscoder registry service object.
-
Constructor Summary
Constructors Constructor Description SetTokenDeliveryAttributesToResponseContext()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoExecute(ProfileRequestContext profileRequestContext)protected voiddoInitialize()protected booleandoPreExecute(ProfileRequestContext profileRequestContext)private voidencodeAttribute(net.shibboleth.idp.attribute.transcoding.AttributeTranscoderRegistry registry, ProfileRequestContext profileRequestContext, net.shibboleth.idp.attribute.IdPAttribute attribute)Access the registry of transcoding rules to transform the input attribute into claims.voidsetAlwaysIncludedAttributesLookupStrategy(Function<ProfileRequestContext,Set<String>> strategy)Set the strategy used to obtain the set of attribute IDs always included in ID tokens.voidsetAttributeContextLookupStrategy(Function<ProfileRequestContext,net.shibboleth.idp.attribute.context.AttributeContext> strategy)Set the strategy used to locate theAttributeContextassociated with a givenProfileRequestContext.voidsetDeniedUserInfoAttributesLookupStrategy(Function<ProfileRequestContext,Set<String>> strategy)Set the strategy used to obtain the set of attribute IDs to omit from UserInfo tokens.voidsetEncodedAttributesLookupStrategy(Function<ProfileRequestContext,Set<String>> strategy)Set 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.voidsetTranscoderRegistry(ReloadableService<net.shibboleth.idp.attribute.transcoding.AttributeTranscoderRegistry> registry)Sets the registry of transcoding rules to apply to encode attributes.-
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, 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.
-
encodedAttributesLookupStrategy
@Nonnull private Function<ProfileRequestContext,Set<String>> encodedAttributesLookupStrategy
Strategy used to obtain the set of attribute IDs to encode for back-channel recovery.
-
alwaysIncludedAttributesLookupStrategy
@Nonnull private Function<ProfileRequestContext,Set<String>> alwaysIncludedAttributesLookupStrategy
Strategy used to obtain the set of attribute IDs to include in the ID token in all cases.
-
deniedUserInfoAttributesLookupStrategy
@Nonnull private Function<ProfileRequestContext,Set<String>> deniedUserInfoAttributesLookupStrategy
Strategy used to obtain the set of attribute IDs to omit from the UserInfo token.
-
transcoderRegistry
@NonnullAfterInit private ReloadableService<net.shibboleth.idp.attribute.transcoding.AttributeTranscoderRegistry> transcoderRegistry
Transcoder registry service object.
-
ignoringUnencodableAttributes
private boolean ignoringUnencodableAttributes
Whether attributes that result in anAttributeEncodingExceptionwhen being encoded should be ignored or result in anIdPEventIds.UNABLE_ENCODE_ATTRIBUTEtransition.
-
attributeCtx
@Nullable private net.shibboleth.idp.attribute.context.AttributeContext attributeCtx
AttributeContext to use.
-
encodedAttributes
@Nullable @NonnullElements private Set<String> encodedAttributes
Attributes to encode for recovery.
-
alwaysIncludedAttributes
@Nullable @NonnullElements private Set<String> alwaysIncludedAttributes
Attributes to include in ID token no matter what.
-
deniedUserInfoAttributes
@Nullable @NonnullElements private Set<String> deniedUserInfoAttributes
Attributes to omit from UserInfo token.
-
-
Method Detail
-
setTranscoderRegistry
public void setTranscoderRegistry(@Nonnull ReloadableService<net.shibboleth.idp.attribute.transcoding.AttributeTranscoderRegistry> registry)Sets the registry of transcoding rules to apply to encode attributes.- Parameters:
registry- registry service interface
-
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,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
-
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
protected void doInitialize() throws ComponentInitializationException- Overrides:
doInitializein classAbstractInitializableComponent- Throws:
ComponentInitializationException
-
doPreExecute
protected boolean doPreExecute(@Nonnull ProfileRequestContext profileRequestContext)- Overrides:
doPreExecutein classAbstractOIDCResponseAction
-
doExecute
protected void doExecute(@Nonnull ProfileRequestContext profileRequestContext)- Overrides:
doExecutein classAbstractProfileAction
-
encodeAttribute
private void encodeAttribute(@Nonnull net.shibboleth.idp.attribute.transcoding.AttributeTranscoderRegistry registry, @Nonnull ProfileRequestContext profileRequestContext, @Nonnull net.shibboleth.idp.attribute.IdPAttribute attribute) throws net.shibboleth.idp.attribute.AttributeEncodingExceptionAccess 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:
net.shibboleth.idp.attribute.AttributeEncodingException- if a non-ignorable error occurs
-
-