Table of Contents

Class ChallengesController

Namespace
SEBT.Portal.Api.Controllers.IdProofing
Assembly
SEBT.Portal.Api.dll

Controller for document verification challenge operations.

[ApiController]
[Route("api/challenges")]
[Authorize]
[ServiceFilter(typeof(ResolveUserFilter))]
public class ChallengesController : ControllerBase
Inheritance
object
ControllerBase
ChallengesController

Methods

Resubmit(Guid, ICommandHandler<ResubmitChallengeCommand, ResubmitChallengeResponse>, CancellationToken)

Retries document verification after a Socure RESUBMIT decision (DC-301). Opens a fresh docv_stepup evaluation as a new challenge; the prior Resubmit challenge stays terminal. Returns the new challenge ID + DocV URL for the user to re-capture their documents.

[HttpPost("{id:guid}/resubmit")]
[ProducesResponseType(typeof(ResubmitChallengeResponse), 200)]
[ProducesResponseType(401)]
[ProducesResponseType(404)]
[ProducesResponseType(409)]
[ProducesResponseType(502)]
public Task<IActionResult> Resubmit(Guid id, ICommandHandler<ResubmitChallengeCommand, ResubmitChallengeResponse> handler, CancellationToken cancellationToken)

Parameters

id Guid

The prior challenge's public GUID (must be in Resubmit state).

handler ICommandHandler<ResubmitChallengeCommand, ResubmitChallengeResponse>

The command handler.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<IActionResult>

Start(Guid, ICommandHandler<StartChallengeCommand, StartChallengeResponse>, CancellationToken)

Starts a document verification challenge by generating a Socure DocV session token. Called when the user clicks "Continue" on the document verification interstitial.

[HttpGet("{id:guid}/start")]
[ProducesResponseType(typeof(StartChallengeResponse), 200)]
[ProducesResponseType(401)]
[ProducesResponseType(404)]
[ProducesResponseType(409)]
public Task<IActionResult> Start(Guid id, ICommandHandler<StartChallengeCommand, StartChallengeResponse> handler, CancellationToken cancellationToken)

Parameters

id Guid

The challenge's public GUID.

handler ICommandHandler<StartChallengeCommand, StartChallengeResponse>

The command handler.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<IActionResult>