Class OtpRateLimitMiddleware
- Namespace
- SEBT.Portal.Api.Middleware
- Assembly
- SEBT.Portal.Api.dll
Middleware that extracts the email address from the OTP request body and stores it in HttpContext.Items for use by rate limiting partition key resolver.
public class OtpRateLimitMiddleware
- Inheritance
-
objectOtpRateLimitMiddleware
Constructors
OtpRateLimitMiddleware(RequestDelegate, ILogger<OtpRateLimitMiddleware>)
Initializes a new instance of the OtpRateLimitMiddleware class.
public OtpRateLimitMiddleware(RequestDelegate next, ILogger<OtpRateLimitMiddleware> logger)
Parameters
nextRequestDelegateThe next middleware in the pipeline.
loggerILogger<OtpRateLimitMiddleware>The logger instance.
Methods
InvokeAsync(HttpContext)
Invokes the middleware to extract email from request body for rate limiting.
public Task InvokeAsync(HttpContext context)
Parameters
contextHttpContextThe HTTP context.
Returns
- Task