Class DefaultNameIdentifierFormatStrategy
java.lang.Object
org.opensaml.saml.common.profile.logic.MetadataNameIdentifierFormatStrategy
net.shibboleth.idp.saml.profile.logic.DefaultNameIdentifierFormatStrategy
- All Implemented Interfaces:
Function<ProfileRequestContext,
List<String>>
Function to filter a set of candidate NameIdentifier/NameID Format values derived from an entity's SAML metadata
against configuration preferences.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String
Default format to use if nothing else is known.private final org.slf4j.Logger
Class logger.private String
Override theProfileConfiguration
to look for rather than whatever's populated.Strategy used to locate theRelyingPartyContext
associated with a givenProfileRequestContext
. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply
(ProfileRequestContext input) void
setDefaultFormat
(String format) Set the default format to return.void
setProfileId
(String id) Set the profile configuration ID to locate in theRelyingPartyConfiguration
for the purposes of establishing format precedence rules.void
Set the strategy used to locate theRelyingPartyContext
associated with a givenProfileRequestContext
.Methods inherited from class org.opensaml.saml.common.profile.logic.MetadataNameIdentifierFormatStrategy
setSSODescriptorLookupStrategy
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
relyingPartyContextLookupStrategy
@Nonnull private Function<ProfileRequestContext,RelyingPartyContext> relyingPartyContextLookupStrategyStrategy used to locate theRelyingPartyContext
associated with a givenProfileRequestContext
. -
profileId
Override theProfileConfiguration
to look for rather than whatever's populated. -
defaultFormat
Default format to use if nothing else is known.
-
-
Constructor Details
-
DefaultNameIdentifierFormatStrategy
public DefaultNameIdentifierFormatStrategy()Constructor.
-
-
Method Details
-
setRelyingPartyContextLookupStrategy
public void setRelyingPartyContextLookupStrategy(@Nonnull Function<ProfileRequestContext, RelyingPartyContext> strategy) Set the strategy used to locate theRelyingPartyContext
associated with a givenProfileRequestContext
.- Parameters:
strategy
- strategy used to locate theRelyingPartyContext
associated with a givenProfileRequestContext
-
setProfileId
Set the profile configuration ID to locate in theRelyingPartyConfiguration
for the purposes of establishing format precedence rules.By default/without one set, the strategy is to use the configuration object populated in the
RelyingPartyContext
.- Parameters:
id
- profile ID to look for
-
setDefaultFormat
Set the default format to return.- Parameters:
format
- default format
-
apply
- Specified by:
apply
in interfaceFunction<ProfileRequestContext,
List<String>> - Overrides:
apply
in classMetadataNameIdentifierFormatStrategy
-