Class WebhookController
- Namespace
- SEBT.Portal.Api.Controllers.IdProofing
- Assembly
- SEBT.Portal.Api.dll
Controller for receiving Socure webhook notifications. Anonymous — Socure calls this endpoint, not an authenticated user. Protected by webhook signature validation.
[ApiController]
[Route("api/socure")]
[AllowAnonymous]
[EnableRateLimiting("webhook-policy")]
public class WebhookController : ControllerBase
- Inheritance
-
objectControllerBaseWebhookController
Constructors
WebhookController(SocureSettings, ILogger<WebhookController>)
Controller for receiving Socure webhook notifications. Anonymous — Socure calls this endpoint, not an authenticated user. Protected by webhook signature validation.
public WebhookController(SocureSettings socureSettings, ILogger<WebhookController> logger)
Parameters
socureSettingsSocureSettingsloggerILogger<WebhookController>
Methods
HandleWebhook(WebhookPayload, ICommandHandler<ProcessWebhookCommand>, CancellationToken)
Receives a Socure evaluation_completed webhook. Always returns 200 OK to prevent Socure retries, even if processing fails internally.
[HttpPost("webhook")]
[ProducesResponseType(200)]
public Task<IActionResult> HandleWebhook(WebhookPayload payload, ICommandHandler<ProcessWebhookCommand> handler, CancellationToken cancellationToken)
Parameters
payloadWebhookPayloadThe Socure webhook payload.
handlerICommandHandler<ProcessWebhookCommand>The command handler.
cancellationTokenCancellationTokenCancellation token.
Returns
- Task<IActionResult>