Table of Contents

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
object
MustChangePasswordMiddleware

Constructors

MustChangePasswordMiddleware(RequestDelegate)

public MustChangePasswordMiddleware(RequestDelegate next)

Parameters

next RequestDelegate

Methods

InvokeAsync(HttpContext)

public Task InvokeAsync(HttpContext context)

Parameters

context HttpContext

Returns

Task