Class AuthnMethodReferenceToPrincipalMappingStrategy
java.lang.Object
net.shibboleth.idp.plugin.authn.duo.impl.AuthnMethodReferenceToPrincipalMappingStrategy
- All Implemented Interfaces:
Function<ProfileRequestContext,Collection<Principal>>
public class AuthnMethodReferenceToPrincipalMappingStrategy
extends Object
implements Function<ProfileRequestContext,Collection<Principal>>
A customisable principal mapping function that translates Authentication Method Reference (AMR) strings found in a
Duo ID Token to internal
Principal instances.
A convenience implementation of a context-to-principal mapping strategy supported by
ValidateDuoTokenAuthenticationResult. It allows one or more Principals
to be associated with each AMR value present in the authentication token.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final StringThe name of the AMR claim inside the Duo authentication token.private final org.slf4j.LoggerClass logger.private final Map<String,Collection<Principal>> Mappings to transform amr claims. -
Constructor Summary
ConstructorsConstructorDescriptionConstructor. -
Method Summary
-
Field Details
-
AMR_CLAIM_NAME
The name of the AMR claim inside the Duo authentication token.- See Also:
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
principalMappings
Mappings to transform amr claims.
-
-
Constructor Details
-
AuthnMethodReferenceToPrincipalMappingStrategy
public AuthnMethodReferenceToPrincipalMappingStrategy(@Nullable @NonnullElements @ParameterName(name="mappings") Map<String, Collection<Principal>> mappings) Constructor.- Parameters:
mappings- the AMR value to Principal mappings
-
-
Method Details
-
apply
@Nonnull @NotLive @Unmodifiable public Collection<Principal> apply(@Nullable ProfileRequestContext profileRequestContext) - Specified by:
applyin interfaceFunction<ProfileRequestContext,Collection<Principal>>
-