Class MapDrivenAuthnContextTranslationStrategy
- java.lang.Object
-
- net.shibboleth.idp.saml.authn.principal.impl.MapDrivenAuthnContextTranslationStrategy
-
- All Implemented Interfaces:
Function<AuthnContext,Collection<Principal>>
public class MapDrivenAuthnContextTranslationStrategy extends Object implements Function<AuthnContext,Collection<Principal>>
Implements a set of default logic for mapping anAuthnContext's content into a set of custom Principals based on a set of static mapping rules.- Since:
- 4.0.0
-
-
Field Summary
Fields Modifier and Type Field Description private org.slf4j.LoggerlogClass logger.private Map<Principal,Collection<Principal>>principalMappingsMappings to transform proxied Principals.
-
Constructor Summary
Constructors Constructor Description MapDrivenAuthnContextTranslationStrategy()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<Principal>apply(AuthnContext input)voidsetMappings(Map<Principal,Collection<Principal>> mappings)Sets the mappings from input/proxied Principals to zero or more equivalent values to use.
-
-
-
Field Detail
-
log
@Nonnull private final org.slf4j.Logger log
Class logger.
-
principalMappings
@Nonnull @NonnullElements private Map<Principal,Collection<Principal>> principalMappings
Mappings to transform proxied Principals.
-
-
Method Detail
-
setMappings
public void setMappings(@Nullable @NonnullElements Map<Principal,Collection<Principal>> mappings)
Sets the mappings from input/proxied Principals to zero or more equivalent values to use.Any values not mapped will be assumed to be passed through.
- Parameters:
mappings-Principalmappings
-
apply
@Nullable public Collection<Principal> apply(@Nullable AuthnContext input)
- Specified by:
applyin interfaceFunction<AuthnContext,Collection<Principal>>
-
-