Hi Developers,
Pain
The API needs to determine which tenant is making each request and set the appropriate context for database queries and business logic.
Suggested Solution
Create ASP.NET Core middleware that extracts tenant from the request (header, subdomain, or auth claim) and sets the tenant context for the request pipeline.
Implementation:
- Create middleware to extract tenant
- Support multiple resolution strategies
- Add tenant to logging scope
- Handle invalid tenant gracefully
Tasks
Acceptance Criteria
More Information
Files to Create/Modify:
- NEW:
src/WebAPI/Middleware/TenantResolutionMiddleware.cs
- MODIFY:
src/WebAPI/Program.cs
- Update authentication configuration
Dependencies: Previous PBI must be completed first
Epic: #1483
Thanks!
Hi Developers,
Pain
The API needs to determine which tenant is making each request and set the appropriate context for database queries and business logic.
Suggested Solution
Create ASP.NET Core middleware that extracts tenant from the request (header, subdomain, or auth claim) and sets the tenant context for the request pipeline.
Implementation:
Tasks
Acceptance Criteria
More Information
Files to Create/Modify:
src/WebAPI/Middleware/TenantResolutionMiddleware.cssrc/WebAPI/Program.csDependencies: Previous PBI must be completed first
Epic: #1483
Thanks!