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>>
public class DefaultNameIdentifierFormatStrategy extends MetadataNameIdentifierFormatStrategy
Function to filter a set of candidate NameIdentifier/NameID Format values derived from an entity's SAML metadata
against configuration preferences.
-
Field Summary
Fields Modifier and Type Field Description private String
defaultFormat
Default format to use if nothing else is known.private org.slf4j.Logger
log
Class logger.private String
profileId
Override theProfileConfiguration
to look for rather than whatever's populated.private Function<ProfileRequestContext,RelyingPartyContext>
relyingPartyContextLookupStrategy
Strategy used to locate theRelyingPartyContext
associated with a givenProfileRequestContext
. -
Constructor Summary
Constructors Constructor Description DefaultNameIdentifierFormatStrategy()
Constructor. -
Method Summary
Modifier and Type Method Description List<String>
apply(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
setRelyingPartyContextLookupStrategy(Function<ProfileRequestContext,RelyingPartyContext> strategy)
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
-