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 an
AuthnContext
'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.Logger
log
Class logger.private Map<Principal,Collection<Principal>>
principalMappings
Mappings to transform proxied Principals. -
Constructor Summary
Constructors Constructor Description MapDrivenAuthnContextTranslationStrategy()
Constructor. -
Method Summary
Modifier and Type Method Description Collection<Principal>
apply(AuthnContext input)
void
setMappings(Map<Principal,Collection<Principal>> mappings)
Sets the mappings from input/proxied Principals to zero or more equivalent values to use.
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
principalMappings
Mappings to transform proxied Principals.
-
-
Constructor Details
-
MapDrivenAuthnContextTranslationStrategy
public MapDrivenAuthnContextTranslationStrategy()Constructor.
-
-
Method Details
-
setMappings
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
-Principal
mappings
-
apply
- Specified by:
apply
in interfaceFunction<AuthnContext,Collection<Principal>>
-