Class AttributeResolutionSubjectLookupFunction
- java.lang.Object
-
- net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
-
- net.shibboleth.utilities.java.support.component.AbstractIdentifiedInitializableComponent
-
- net.shibboleth.utilities.java.support.component.AbstractIdentifiableInitializableComponent
-
- net.shibboleth.idp.plugin.oidc.op.profile.logic.AttributeResolutionSubjectLookupFunction
-
- All Implemented Interfaces:
Function<ProfileRequestContext,String>,Component,DestructableComponent,IdentifiableComponent,IdentifiedComponent,InitializableComponent,ContextDataLookupFunction<ProfileRequestContext,String>
public class AttributeResolutionSubjectLookupFunction extends AbstractIdentifiableInitializableComponent implements ContextDataLookupFunction<ProfileRequestContext,String>
A function that returns subject identifier from filtered claims. Encoded value of the first attribute that would be encoded as claim sub is returned. TODO: This needs revisiting, it's not really a great way to configure this. Specifying the attribute(s) to pull from would be the expected solution here. It may be warranted to just repurpose the IdP's NameID generation layer since that's nominally type-invariant anyway, it can handle both SAML 1 and SAML 2 objects now.
-
-
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 org.slf4j.LoggerlogClass logger.private static StringSUB_CLAIM_NAMEName of the sub claim.private ReloadableService<net.shibboleth.idp.attribute.transcoding.AttributeTranscoderRegistry>transcoderRegistryTranscoder registry service object.
-
Constructor Summary
Constructors Constructor Description AttributeResolutionSubjectLookupFunction()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringapply(ProfileRequestContext input)protected voiddoInitialize()voidsetAttributeContextLookupStrategy(Function<ProfileRequestContext,net.shibboleth.idp.attribute.context.AttributeContext> strategy)Set the strategy used to locate theAttributeContextassociated with a givenProfileRequestContext.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.utilities.java.support.component.AbstractIdentifiableInitializableComponent
setId
-
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractIdentifiedInitializableComponent
getId
-
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.IdentifiedComponent
getId
-
-
-
-
Field Detail
-
SUB_CLAIM_NAME
@Nonnull @NotEmpty private static final String SUB_CLAIM_NAME
Name of the sub claim.- See Also:
- Constant Field Values
-
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.
-
transcoderRegistry
@NonnullAfterInit private ReloadableService<net.shibboleth.idp.attribute.transcoding.AttributeTranscoderRegistry> transcoderRegistry
Transcoder registry service object.
-
-
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
-
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
-
doInitialize
protected void doInitialize() throws ComponentInitializationException- Overrides:
doInitializein classAbstractIdentifiedInitializableComponent- Throws:
ComponentInitializationException
-
apply
@Nullable public String apply(@Nullable ProfileRequestContext input)
- Specified by:
applyin interfaceFunction<ProfileRequestContext,String>
-
-