Class MustChangePasswordMiddleware
- Namespace
- KadicErp.WebApi.Middlewares
- Assembly
- KadicErp.WebApi.dll
Hard gate for temporary passwords (plan portal-user-provisioning P4). While the JWT carries the "must_change_password" claim the ERP API rejects EVERY authenticated request with 403 — the ERP hosts no change-password endpoint, so a user with a temporary password has nothing legitimate to do here until they rotate it against KadicAuth. The frontend redirect to force-change-password is UX only; this is the security control.
public sealed class MustChangePasswordMiddleware
- Inheritance
-
objectMustChangePasswordMiddleware
Constructors
MustChangePasswordMiddleware(RequestDelegate)
public MustChangePasswordMiddleware(RequestDelegate next)
Parameters
nextRequestDelegate
Methods
InvokeAsync(HttpContext)
public Task InvokeAsync(HttpContext context)
Parameters
contextHttpContext
Returns
- Task