Class AttributeResolutionSubjectLookupFunction
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
net.shibboleth.shared.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
FieldsModifier and TypeFieldDescriptionStrategy used to locate theAttributeContextassociated with a givenProfileRequestContext.private org.slf4j.LoggerClass logger.private static final StringName of the sub claim.Transcoder registry service object. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(ProfileRequestContext input) protected voidvoidSet the strategy used to locate theAttributeContextassociated with a givenProfileRequestContext.voidSets the registry of transcoding rules to apply to encode attributes.Methods inherited from class net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
setIdMethods inherited from class net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
ensureId, getId, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentExceptionMethods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, doDestroy, 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.IdentifiedComponent
getId
-
Field Details
-
SUB_CLAIM_NAME
Name of the sub claim.- See Also:
-
log
@Nonnull private org.slf4j.Logger logClass logger. -
attributeContextLookupStrategy
Strategy used to locate theAttributeContextassociated with a givenProfileRequestContext. -
transcoderRegistry
Transcoder registry service object.
-
-
Constructor Details
-
AttributeResolutionSubjectLookupFunction
AttributeResolutionSubjectLookupFunction()Constructor.
-
-
Method Details
-
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
-
doInitialize
- Overrides:
doInitializein classAbstractIdentifiedInitializableComponent- Throws:
ComponentInitializationException
-
apply
- Specified by:
applyin interfaceFunction<ProfileRequestContext,String>