Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tenant extraction in TenantService, X-Tenant header deprecation #633

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

byewokko
Copy link
Collaborator

@byewokko byewokko commented Nov 7, 2024

Changes

  • ⚠️ BREAKING ⚠️ TenantService is necessary for tenant-aware apps. Without TenantService, the Tenant context variable is undefined.
  • ⚠️ BREAKING ⚠️ X-Tenant HTTP header is no longer used. Tenant-aware endpoints need to have tenant parameter in URL path or query.
  • It is now possible to make tenant-aware without authorization. To do so, initialize only TenantService, without AuthService.

Adaptation guide

To keep your app tenant-aware, initialize TenantService:

import asab.web.tenant
asab.web.tenant.TenantService(app)

@byewokko byewokko added the enhancement New feature or request label Nov 7, 2024
@byewokko byewokko self-assigned this Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant