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

# Class SecondFactorOnlyCredentialLabeller

java.lang.Object
net.shibboleth.idp.plugin.authn.webauthn.admin.impl.SecondFactorOnlyCredentialLabeller

All Implemented Interfaces:
  `BiFunction<EnhancedCredentialRecord,ProfileRequestContext,List<String>>`

@ThreadSafe public class SecondFactorOnlyCredentialLabeller extends Object implements BiFunction<EnhancedCredentialRecord,ProfileRequestContext,List<String>>
A credential labeller function that labels credentials as 'SecondFactor' if the authenticator that created the credential should only be used as a second factor, and not sole factor of authentication.

## Field Summary

Fields
Modifier and Type
Field
Description
`private static final String`
`DEFAULT_LABEL`
The default label to use for second factor only credentials.
`private String`
`label`
The label to use for second factor only credentials.
`private final org.slf4j.Logger`
`log`
Class logger.
`private Set<com.yubico.fido.metadata.AAGUID>`
`secondFactorOnlyAuthenticators`
A set of authenticators that should only be used for second factor authentication, based on their AAGUID.

## Constructor Summary

Constructors
Constructor
Description
`SecondFactorOnlyCredentialLabeller()`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`List<String>`
`apply(EnhancedCredentialRecord cred, ProfileRequestContext prc)`
`void`
`setLabel(String labelIn)`
Set the label to use for second factor only credentials.
`void`
`setSecondFactorOnlyAuthenticators(Set<String> allowed)`
Set the authenticators that should only be used for second factor authentication based on their AAGUID.

### 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.BiFunction

`andThen`

## Field Details

### DEFAULT_LABEL

@Nonnull @NotEmpty private static final String DEFAULT_LABEL
The default label to use for second factor only credentials.

See Also:
  - Constant Field Values

### log

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

### secondFactorOnlyAuthenticators

@Nonnull @NotLive @Unmodifiable private Set<com.yubico.fido.metadata.AAGUID> secondFactorOnlyAuthenticators
A set of authenticators that should only be used for second factor authentication, based on their AAGUID.

### label

@Nonnull @NotEmpty private String label
The label to use for second factor only credentials.

## Constructor Details

### SecondFactorOnlyCredentialLabeller

public SecondFactorOnlyCredentialLabeller()
Constructor.

## Method Details

### setSecondFactorOnlyAuthenticators

public void setSecondFactorOnlyAuthenticators(Set<String> allowed)
Set the authenticators that should only be used for second factor authentication based on their AAGUID.

Parameters:
  `allowed` - The second factor authenticators to set.

### setLabel

public void setLabel(@Nonnull String labelIn)
Set the label to use for second factor only credentials.

Parameters:
  `labelIn` - The label to set.

### apply

public List<String> apply(@Nullable EnhancedCredentialRecord cred, @Nullable ProfileRequestContext prc)

Specified by:
  `apply` in interface `BiFunction<EnhancedCredentialRecord,ProfileRequestContext,List<String>>`