Package net.shibboleth.idp.saml.saml2.profile.config.navigate

# Class ProxyAwareDefaultAuthenticationMethodsLookupFunction

java.lang.Object
net.shibboleth.idp.saml.saml2.profile.config.navigate.ProxyAwareDefaultAuthenticationMethodsLookupFunction

All Implemented Interfaces:
  `Function<ProfileRequestContext,Collection<Principal>>`

public class ProxyAwareDefaultAuthenticationMethodsLookupFunction extends Object implements Function<ProfileRequestContext,Collection<Principal>>
Implements a set of default logic for determining the custom principals to derive the `RequestedAuthnContext` from.

This operates in two different scenarios: ordinary use and proxy SAML authentication use, detectable by whether the input context is parent-less (the former), or the child of an `AuthenticationContext`.

In normal use, the value returned is empty.

In proxy use, the value returned is empty unless the parent context itself contains a child context carrying particular values. In other words, the proxy default is "passthrough" of the values.

Since:
  4.0.0

## Field Summary

Fields
Modifier and Type
Field
Description
`private Map<Principal,Collection<Principal>>`
`principalMappings`
Mappings to transform proxied Principals.

## Constructor Summary

Constructors
Constructor
Description
`ProxyAwareDefaultAuthenticationMethodsLookupFunction()`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`Collection<Principal>`
`apply(ProfileRequestContext input)`
`void`
`setMappings(Map<Principal,Collection<Principal>> mappings)`
Sets the mappings from input/proxied Principals to zero or more equivalent values to use.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface java.util.function.Function

`andThen, compose`

## Field Details

### principalMappings

@Nonnull private Map<Principal,Collection<Principal>> principalMappings
Mappings to transform proxied Principals.

## Constructor Details

### ProxyAwareDefaultAuthenticationMethodsLookupFunction

public ProxyAwareDefaultAuthenticationMethodsLookupFunction()
Constructor.

## Method Details

### setMappings

public void setMappings(@Nullable 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` - `Principal` mappings

### apply

@Nonnull @Unmodifiable @NotLive public Collection<Principal> apply(@Nullable ProfileRequestContext input)

Specified by:
  `apply` in interface `Function<ProfileRequestContext,Collection<Principal>>`