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

# Class GenerateServerChallenge.DefaultChallengeGenerator

java.lang.Object
net.shibboleth.idp.plugin.authn.webauthn.impl.GenerateServerChallenge.DefaultChallengeGenerator

All Implemented Interfaces:
  `Function<ProfileRequestContext,byte[]>`

Enclosing class:
  GenerateServerChallenge

private static final class GenerateServerChallenge.DefaultChallengeGenerator extends Object implements Function<ProfileRequestContext,byte[]>
Default challenge generator that generates a 32 byte randomized challenge of sufficient entropy. Returns `null` iff one can not be generated.

## Field Summary

Fields
Modifier and Type
Field
Description
`private final IdentifierGenerationStrategy`
`challengeGenerator`
The secure random challenge generation strategy.
`private final org.slf4j.Logger`
`log`
Class logger.

## Constructor Summary

Constructors
Constructor
Description
`DefaultChallengeGenerator()`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`byte[]`
`apply(ProfileRequestContext input)`

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

### log

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

### challengeGenerator

private final IdentifierGenerationStrategy challengeGenerator
The secure random challenge generation strategy.

## Constructor Details

### DefaultChallengeGenerator

public DefaultChallengeGenerator() throws ComponentInitializationException
Constructor.

Throws:
  `ComponentInitializationException` - if there is an error creating the identifier strategy

## Method Details

### apply

@Nullable public byte[] apply(@Nullable ProfileRequestContext input)

Specified by:
  `apply` in interface `Function<ProfileRequestContext,byte[]>`