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

# Class ChainingCredentialPolicyRule

java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
net.shibboleth.idp.plugin.authn.webauthn.policy.impl.AbstractCredentialPolicyRule
net.shibboleth.idp.plugin.authn.webauthn.policy.impl.ChainingCredentialPolicyRule

All Implemented Interfaces:
  `CredentialPolicy`, `Component`, `DestructableComponent`, `IdentifiableComponent`, `IdentifiedComponent`, `InitializableComponent`

public class ChainingCredentialPolicyRule extends AbstractCredentialPolicyRule
A `CredentialPolicy` implementation that verifies an authentication credential is acceptable based on a chain of configured rules.

Verification ends if any of the chained rules signals the authentication credential should be rejected.

## Nested Class Summary

## Nested classes/interfaces inherited from interface net.shibboleth.idp.plugin.authn.webauthn.policy.CredentialPolicy

`CredentialPolicy.CredentialPolicyOutcome`

## Field Summary

Fields
Modifier and Type
Field
Description
`private List<CredentialPolicy>`
`credentialPolicyChain`
An ordered chain of authentication credentials policies.
`private final org.slf4j.Logger`
`log`
Class logger.

## Constructor Summary

Constructors
Constructor
Description
`ChainingCredentialPolicyRule()`

## Method Summary

Modifier and Type
Method
Description
`protected CredentialPolicy.CredentialPolicyOutcome`
`doEvaluate(EnhancedCredentialRecord credential, ProfileRequestContext prc, WebAuthnAuthenticationContext webAuthnContext)`
Execute the policy.
`protected void`
`doInitialize()`
`void`
`setCredentialPolicyChain(List<CredentialPolicy> chain)`
Set the chain of policies that should be applied to the authentication credential.

### Methods inherited from class net.shibboleth.idp.plugin.authn.webauthn.policy.impl.AbstractCredentialPolicyRule

`evaluate, getFidoMetadataService, setActivationCondition, setActivationConditionStrategy, setFidoMetadataService, setWebAuthnContextLookupStrategy`

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

`setId`

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

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

## Field Details

### log

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

### credentialPolicyChain

private List<CredentialPolicy> credentialPolicyChain
An ordered chain of authentication credentials policies.

## Constructor Details

### ChainingCredentialPolicyRule

public ChainingCredentialPolicyRule()

## Method Details

### doInitialize

protected void doInitialize() throws ComponentInitializationException

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

### setCredentialPolicyChain

public void setCredentialPolicyChain(@Nullable List<CredentialPolicy> chain)
Set the chain of policies that should be applied to the authentication credential.

Parameters:
  `chain` - the authentication credential policy chain to set.

### doEvaluate

protected CredentialPolicy.CredentialPolicyOutcome doEvaluate(@Nonnull EnhancedCredentialRecord credential, @Nonnull ProfileRequestContext prc, @Nonnull WebAuthnAuthenticationContext webAuthnContext)
Execute the policy. Implementations should override this method.

Specified by:
  `doEvaluate` in class `AbstractCredentialPolicyRule`
Parameters:
  `credential` - the credential to check the policy rules for
  `prc` - the profile request context
  `webAuthnContext` - the WebAuthn authentication context
Returns:
  the credential policy outcome