Class FunctionalCredentialPolicyRule
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.FunctionalCredentialPolicyRule
- All Implemented Interfaces:
CredentialPolicy,Component,DestructableComponent,IdentifiableComponent,IdentifiedComponent,InitializableComponent
A
CredentialPolicy that evaluates a BiFunction to determine if a credential should be accepted or
rejected.-
Nested Class Summary
Nested classes/interfaces inherited from interface net.shibboleth.idp.plugin.authn.webauthn.policy.CredentialPolicy
CredentialPolicy.CredentialPolicyOutcome -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.slf4j.LoggerClass logger.private BiFunction<EnhancedCredentialRecord,FunctionalRuleContext, CredentialPolicy.CredentialPolicyOutcome> The function to run. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected CredentialPolicy.CredentialPolicyOutcomedoEvaluate(EnhancedCredentialRecord credential, ProfileRequestContext prc, WebAuthnAuthenticationContext webAuthnContext) Execute the policy.voidsetRule(BiFunction<EnhancedCredentialRecord, FunctionalRuleContext, CredentialPolicy.CredentialPolicyOutcome> function) Set the policy function to run.Methods inherited from class net.shibboleth.idp.plugin.authn.webauthn.policy.impl.AbstractCredentialPolicyRule
evaluate, getFidoMetadataService, setActivationCondition, setActivationConditionStrategy, setFidoMetadataService, setWebAuthnContextLookupStrategyMethods inherited from class net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
setIdMethods inherited from class net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
doInitialize, ensureId, getId, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentExceptionMethods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, doDestroy, initialize, isDestroyed, isInitializedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.shibboleth.shared.component.IdentifiedComponent
getId
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
rule
@Nonnull private BiFunction<EnhancedCredentialRecord,FunctionalRuleContext, ruleCredentialPolicy.CredentialPolicyOutcome> The function to run. By default this returnsCredentialPolicy.CredentialPolicyOutcome.IGNORE.
-
-
Constructor Details
-
FunctionalCredentialPolicyRule
public FunctionalCredentialPolicyRule()Constructor.
-
-
Method Details
-
setRule
public void setRule(@Nonnull BiFunction<EnhancedCredentialRecord, FunctionalRuleContext, CredentialPolicy.CredentialPolicyOutcome> function) Set the policy function to run.- Parameters:
function- the rule to set.
-
doEvaluate
protected CredentialPolicy.CredentialPolicyOutcome doEvaluate(EnhancedCredentialRecord credential, ProfileRequestContext prc, WebAuthnAuthenticationContext webAuthnContext) Execute the policy. Implementations should override this method.- Specified by:
doEvaluatein classAbstractCredentialPolicyRule- Parameters:
credential- the credential to check the policy rules forprc- the profile request contextwebAuthnContext- the WebAuthn authentication context- Returns:
- the credential policy outcome
-