Introduce a new authentication mechanism using JWT tokens stored in cookies, with a custom CookieAuthHandler for API request authentication. Add AuthServiceSettings for configuration and UserHeaderHandler to propagate user context in outgoing HTTP requests. Update service registrations and configuration files to support the new authentication flow. Refactor CurrentUserService for simplicity. This enables stateless, cookie-based authentication and consistent user context across API calls.
Introduce ICurrentUserService and its implementation to access the current user's username. Inject this service into CreateCatalogHandler and UpdateCatalogHandler to set AddedWho and ChangedWho fields dynamically. Register the service and IHttpContextAccessor in DI, and enable authentication middleware. Update project and using statements accordingly.