Namespace SEBT.Portal.UseCases.IdProofing
Classes
- GetVerificationStatusQuery
Query to check the current status of a document verification challenge. Polled by the frontend with exponential backoff after document capture.
- GetVerificationStatusQueryHandler
Handles querying the verification status of a challenge. Performs check-on-read expiration: if a Pending challenge is past its ExpiresAt, it is transitioned to Expired before responding.
- ProcessWebhookCommand
Command to process an incoming Socure webhook notification. The webhook is received anonymously and verified by signature.
- 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.
- ResubmitChallengeCommand
Command to retry document verification after a Socure RESUBMIT decision (DC-301). Opens a brand-new
docv_stepupevaluation; the existing Resubmit challenge is left untouched and a freshDocVerificationChallengerow is persisted in Pending.
- ResubmitChallengeCommandHandler
Handles a user-initiated retry after a Socure RESUBMIT decision (DC-301).
RESUBMIT is terminal at Socure — the original workflow ended and cannot be resumed. This handler starts a brand-new evaluation against the
docv_stepupworkflow (which only emits ACCEPT/REJECT, structurally capping retries at one) and persists a freshDocVerificationChallengerow in Pending. The prior Resubmit challenge is left untouched as a terminal record.
- ResubmitChallengeResponse
Response from a successful resubmit retry. Returns the new challenge's public ID so the frontend can poll its status, plus the fresh DocV transaction token + URL for the SDK or new-tab handoff.
- StartChallengeCommand
Command to start a document verification challenge. Generates a Socure DocV session token just-in-time for document capture.
- StartChallengeCommandHandler
Handles starting a document verification challenge. Loads the challenge by (publicId, userId) for IDOR prevention, validates the state transition (must be Created → Pending), calls Socure to generate a DocV session token, and updates the challenge.
- StartChallengeResponse
Response from starting a document verification challenge. Contains the Socure DocV session token and URL for the frontend SDK.
- SubmitIdProofingCommand
Command to submit ID proofing data for risk assessment. Dispatched when the user submits their DOB and optional government ID.
- SubmitIdProofingCommandHandler
Handles ID proofing submission. Orchestrates the flow:
- Validate input
- Early exit if no ID provided (noIdProvided off-boarding)
- Reuse existing active challenge if one exists
- Co-loaded users with SNAP/TANF ID: complete at IAL1+ without Socure (DC warehouse IC+DOB when applicable, then on-file match)
- Load household PII for Socure when available (name, address, phone from state/CMS), then apply qualifying-household gate for Socure (DC) after the user has submitted the form
- Call Socure for risk assessment
- Create a new challenge if document verification is required
- SubmitIdProofingResponse
Response from ID proofing submission. Matches the frontend contract from DC-137.
- VerificationStatusResponse
Response from checking verification status. Matches the frontend contract from DC-137.