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

# Class UsernamelessFlowEnabled

java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.idp.plugin.authn.webauthn.context.logic.UsernamelessFlowEnabled

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

public class UsernamelessFlowEnabled extends AbstractInitializableComponent implements Predicate<ProfileRequestContext>
Predicate to determine if the user is required to enter their username or not. True implies a usernameless flow whilst false implies a passwordless flow.

## Field Summary

Fields
Modifier and Type
Field
Description
`private Predicate<ProfileRequestContext>`
`enabled`
Determines if we want a usernameless flow (true), or a passwordless flow (false).
`private final org.slf4j.Logger`
`log`
Class logger.

## Constructor Summary

Constructors
Constructor
Description
`UsernamelessFlowEnabled()`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`void`
`setEnabled(boolean flag)`
Set a flag that determines if we want a usernameless flow (true), or a passwordless flow (false).
`void`
`setEnabled(Predicate<ProfileRequestContext> predicate)`
Set a predicate that determines if we want a usernameless flow (true), or a passwordless flow (false).
`boolean`
`test(ProfileRequestContext input)`

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

`checkComponentActive, checkSetterPreconditions, destroy, doDestroy, doInitialize, 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 java.util.function.Predicate

`and, negate, or`

## Field Details

### log

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

### enabled

@Nonnull private Predicate<ProfileRequestContext> enabled
Determines if we want a usernameless flow (true), or a passwordless flow (false). Default is false (passwordless).

## Constructor Details

### UsernamelessFlowEnabled

public UsernamelessFlowEnabled()
Constructor.

## Method Details

### setEnabled

public void setEnabled(@Nonnull Predicate<ProfileRequestContext> predicate)
Set a predicate that determines if we want a usernameless flow (true), or a passwordless flow (false).

Parameters:
  `predicate` - the predicate

### setEnabled

public void setEnabled(boolean flag)
Set a flag that determines if we want a usernameless flow (true), or a passwordless flow (false).

Parameters:
  `flag` - the flag to set

### test

public boolean test(@Nullable ProfileRequestContext input)

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