Package net.shibboleth.idp.plugin.authn.webauthn.admin.impl

# Class LabelCredentialRecords

java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
org.opensaml.profile.action.AbstractProfileAction
org.opensaml.profile.action.AbstractConditionalProfileAction
net.shibboleth.idp.profile.AbstractProfileAction
net.shibboleth.idp.authn.AbstractAuthenticationAction
net.shibboleth.idp.plugin.authn.webauthn.admin.impl.LabelCredentialRecords

All Implemented Interfaces:
  `Component`, `DestructableComponent`, `InitializableComponent`, `ProfileAction`, `Aware`, `MessageSource`, `MessageSourceAware`, `Action`

public class LabelCredentialRecords extends AbstractAuthenticationAction
Use the labelling function to add labels to each `EnhancedCredentialRecord` found in the context. The labels can then be displayed in the registration view.

Event:
  `EventIds.PROCEED_EVENT_ID`
Postcondition:
  Add labels to each enhanced credential record in the context

## Field Summary

Fields
Modifier and Type
Field
Description
`private Function<ProfileRequestContext,Collection<EnhancedCredentialRecord>>`
`credentialsLookupStrategy`
The credential record lookup strategy.
`private BiFunction<EnhancedCredentialRecord,ProfileRequestContext,List<String>>`
`labeller`
The labeller used to generate labels for the credential, for display only.
`private final org.slf4j.Logger`
`log`
Class logger.

## Constructor Summary

Constructors
Modifier
Constructor
Description
`protected`
`LabelCredentialRecords()`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`protected void`
`doExecute(ProfileRequestContext profileRequestContext, AuthenticationContext context)`
`protected void`
`doInitialize()`
`void`
`setCredentialsLookupStrategy(Function<ProfileRequestContext,Collection<EnhancedCredentialRecord>> strategy)`
Set the lookup strategy to find credentials to attach capabilities to.
`void`
`setLabeller(BiFunction<EnhancedCredentialRecord,ProfileRequestContext,List<String>> labellerIn)`
Set the labeller used to generate labels for the credential, for display only.

### Methods inherited from class net.shibboleth.idp.authn.AbstractAuthenticationAction

`doExecute, doPreExecute, doPreExecute, setAuthenticationContextLookupStrategy`

### Methods inherited from class net.shibboleth.idp.profile.AbstractProfileAction

`doExecute, execute, getBean, getBean, getMessage, getMessage, getMessage, getParameter, getParameter, getProfileContextLookupStrategy, getRequestContext, getResult, setMessageSource, setProfileContextLookupStrategy`

### Methods inherited from class org.opensaml.profile.action.AbstractConditionalProfileAction

`getActivationCondition, setActivationCondition`

### Methods inherited from class org.opensaml.profile.action.AbstractProfileAction

`doPostExecute, doPostExecute, ensureHttpServletRequest, ensureHttpServletResponse, execute, getHttpServletRequest, getHttpServletRequestSupplier, getHttpServletResponse, getHttpServletResponseSupplier, getLogPrefix, isPreExecuteCalled, setHttpServletRequestSupplier, setHttpServletResponseSupplier`

### Methods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent

`checkComponentActive, checkSetterPreconditions, destroy, doDestroy, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, initialize, isDestroyed, isInitialized`

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

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

### Methods inherited from interface net.shibboleth.shared.component.InitializableComponent

`initialize, isInitialized`

## Field Details

### log

@Nonnull private final org.slf4j.Logger log
Class logger.

### labeller

@Nonnull @NotLive private BiFunction<EnhancedCredentialRecord,ProfileRequestContext,List<String>> labeller
The labeller used to generate labels for the credential, for display only.

### credentialsLookupStrategy

@NonnullAfterInit private Function<ProfileRequestContext,Collection<EnhancedCredentialRecord>> credentialsLookupStrategy
The credential record lookup strategy.

## Constructor Details

### LabelCredentialRecords

protected LabelCredentialRecords()
Constructor.

## Method Details

### doInitialize

protected void doInitialize() throws ComponentInitializationException

Overrides:
  `doInitialize` in class `AbstractInitializableComponent`
Throws:
  `ComponentInitializationException`

### setCredentialsLookupStrategy

public void setCredentialsLookupStrategy(@Nonnull Function<ProfileRequestContext,Collection<EnhancedCredentialRecord>> strategy)
Set the lookup strategy to find credentials to attach capabilities to.

Parameters:
  `strategy` - The credentials lookup strategy to set.

### setLabeller

public void setLabeller(@Nonnull BiFunction<EnhancedCredentialRecord,ProfileRequestContext,List<String>> labellerIn)
Set the labeller used to generate labels for the credential, for display only.

Parameters:
  `labellerIn` - The labeller to set.

### doExecute

protected void doExecute(@Nonnull ProfileRequestContext profileRequestContext, @Nonnull AuthenticationContext context)

Overrides:
  `doExecute` in class `AbstractAuthenticationAction`