Table of Contents

Class ProcessWebhookCommandHandler

Namespace
SEBT.Portal.UseCases.IdProofing
Assembly
SEBT.Portal.UseCases.dll

Handles an incoming Socure webhook. Validates the signature (placeholder in dev), checks idempotency via event_id, correlates to a challenge via ReferenceId/EvalId, validates state transition, and updates both challenge and user state on verification.

public class ProcessWebhookCommandHandler : ICommandHandler<ProcessWebhookCommand>
Inheritance
object
ProcessWebhookCommandHandler
Implements

Constructors

ProcessWebhookCommandHandler(IDocVerificationChallengeRepository, IUserRepository, IHouseholdRepository, SocureSettings, IOptions<IdProofingEligibilitySettings>, IValidator<ProcessWebhookCommand>, ILogger<ProcessWebhookCommandHandler>)

Handles an incoming Socure webhook. Validates the signature (placeholder in dev), checks idempotency via event_id, correlates to a challenge via ReferenceId/EvalId, validates state transition, and updates both challenge and user state on verification.

public ProcessWebhookCommandHandler(IDocVerificationChallengeRepository challengeRepository, IUserRepository userRepository, IHouseholdRepository householdRepository, SocureSettings socureSettings, IOptions<IdProofingEligibilitySettings> idProofingEligibilitySettings, IValidator<ProcessWebhookCommand> validator, ILogger<ProcessWebhookCommandHandler> logger)

Parameters

challengeRepository IDocVerificationChallengeRepository
userRepository IUserRepository
householdRepository IHouseholdRepository
socureSettings SocureSettings
idProofingEligibilitySettings IOptions<IdProofingEligibilitySettings>
validator IValidator<ProcessWebhookCommand>
logger ILogger<ProcessWebhookCommandHandler>

Methods

Handle(ProcessWebhookCommand, CancellationToken)

public Task<Result> Handle(ProcessWebhookCommand command, CancellationToken cancellationToken = default)

Parameters

command ProcessWebhookCommand
cancellationToken CancellationToken

Returns

Task<Result>