Class EnrollmentCheckController
- Namespace
- SEBT.Portal.Api.Controllers.EnrollmentCheck
- Assembly
- SEBT.Portal.Api.dll
Controller for checking child enrollment in Summer EBT benefits. This is a public, unauthenticated endpoint with rate limiting.
[ApiController]
[Route("api/enrollment")]
public class EnrollmentCheckController : ControllerBase
- Inheritance
-
objectControllerBaseEnrollmentCheckController
Methods
CheckEnrollment(ICommandHandler<CheckEnrollmentCommand, EnrollmentCheckResult>, EnrollmentCheckApiRequest, CancellationToken)
Checks enrollment status for one or more children. This is a public, unauthenticated endpoint.
[HttpPost("check")]
[AllowAnonymous]
[EnableRateLimiting("enrollment-check-policy")]
[ProducesResponseType(typeof(EnrollmentCheckApiResponse), 200)]
[ProducesResponseType(typeof(ProblemDetails), 400)]
[ProducesResponseType(429)]
[ProducesResponseType(typeof(ProblemDetails), 503)]
public Task<IActionResult> CheckEnrollment(ICommandHandler<CheckEnrollmentCommand, EnrollmentCheckResult> handler, EnrollmentCheckApiRequest request, CancellationToken cancellationToken = default)
Parameters
handlerICommandHandler<CheckEnrollmentCommand, EnrollmentCheckResult>requestEnrollmentCheckApiRequestcancellationTokenCancellationToken
Returns
- Task<IActionResult>
GetFeatures(IFeatureManager, IOptionsMonitor<EnrollmentCheckerSettings>, IOutagePageStateResolver)
Returns runtime feature state for the standalone enrollment checker app (the maintenance banner toggle with its per-language copy, and the outage page state). This is a public, unauthenticated endpoint. In static-hosting deployments (e.g. CO) the checker has no server of its own, so it polls this endpoint at runtime, which is what lets these be toggled via AWS AppConfig without a checker redeploy.
[HttpGet("features")]
[AllowAnonymous]
[EnableRateLimiting("checker-features-policy")]
[Produces("application/json", new string[] { })]
[ProducesResponseType(typeof(EnrollmentCheckerFeaturesResponse), 200)]
[ProducesResponseType(429)]
public Task<IActionResult> GetFeatures(IFeatureManager featureManager, IOptionsMonitor<EnrollmentCheckerSettings> settings, IOutagePageStateResolver outagePageStateResolver)
Parameters
featureManagerIFeatureManagerFeature manager resolving the banner toggle.
settingsIOptionsMonitor<EnrollmentCheckerSettings>Enrollment checker settings (banner copy).
outagePageStateResolverIOutagePageStateResolverResolves the checker's outage page state (schedule + manual flag).
Returns
- Task<IActionResult>
An OK result with the checker feature state.