Package net.shibboleth.idp.plugin.authn.webauthn.context.logic

# Class IsAdminUsernameCollectionEnabled

java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
net.shibboleth.idp.plugin.authn.webauthn.context.logic.IsAdminUsernameCollectionEnabled

All Implemented Interfaces:
  `Predicate<ProfileRequestContext>`, `Component`, `DestructableComponent`, `IdentifiableComponent`, `IdentifiedComponent`, `InitializableComponent`

public class IsAdminUsernameCollectionEnabled extends AbstractIdentifiableInitializableComponent implements Predicate<ProfileRequestContext>
A predicate that determines if username collection is required as a first step to the registration process. This is determined either from a static flag, or a dynamic function.

## Field Summary

Fields
Modifier and Type
Field
Description
`private final org.slf4j.Logger`
`log`
Class logger.
`private Predicate<ProfileRequestContext>`
`usernameCollectionRequiredPredicate`
The predicate that determines if username collection is required.

## Constructor Summary

Constructors
Constructor
Description
`IsAdminUsernameCollectionEnabled()`

## Method Summary

Modifier and Type
Method
Description
`void`
`setUsernameCollectionRequired(boolean flag)`
Set the flag that determines if username collection is required.
`void`
`setUsernameCollectionRequiredPredicate(Predicate<ProfileRequestContext> predicate)`
Set the predicate that determines if username collection is required.
`boolean`
`test(ProfileRequestContext input)`

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

`setId`

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

`doInitialize, ensureId, getId, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException`

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

`checkComponentActive, checkSetterPreconditions, destroy, doDestroy, 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.IdentifiedComponent

`getId`

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

`and, negate, or`

## Field Details

### log

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

### usernameCollectionRequiredPredicate

private Predicate<ProfileRequestContext> usernameCollectionRequiredPredicate
The predicate that determines if username collection is required.

## Constructor Details

### IsAdminUsernameCollectionEnabled

public IsAdminUsernameCollectionEnabled()

## Method Details

### setUsernameCollectionRequiredPredicate

public void setUsernameCollectionRequiredPredicate(Predicate<ProfileRequestContext> predicate)
Set the predicate that determines if username collection is required.

Parameters:
  `predicate` - is username collection required, predicate.

### setUsernameCollectionRequired

public void setUsernameCollectionRequired(boolean flag)
Set the flag that determines if username collection is required.

Parameters:
  `flag` - is username collection required?.

### test

public boolean test(@Nullable ProfileRequestContext input)

Specified by:
  `test` in interface `Predicate<ProfileRequestContext>`