Files
Teamup/src/Modules
soroush.asadi 414ff44b48 Fix: worker host crashed on DI validation — HTTP auth stack is web-only
IdentityModule registered AddAuthentication/AddJwtBearer/AddAuthorization in both hosts,
but the authorization policy cache requires endpoint routing (EndpointDataSource), which a
Generic Host worker doesn't have — Development's ValidateOnBuild crashed the worker at boot
(found by running it; tests always used WebApplicationFactory). The auth stack now registers
only when IWebHostEnvironment is present; ICurrentUser stays available everywhere (reports
unauthenticated off-request). Verified: worker boots + drains (processor started, heartbeats
healthy); IdentityFlowTests + ReviewFlowTests green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 18:32:18 +03:30
..