-
Notifications
You must be signed in to change notification settings - Fork 163
Multi tenant configuration
Jon P Smith edited this page Aug 12, 2021
·
12 revisions
By default AuthP's multi-tenant feature is not activated. To turn it on you need to set the TenantType to either:
-
TenantTypes.SingleLevelwhere each tenant is completely separate from other tenants -
TenantTypes.HierarchicalTenantwhere each tenant can create sub-tenants
The code below shows how you would set the TenantType on startup
services.RegisterAuthPermissions<Example4Permissions>(options =>
{
options.TenantType = TenantTypes.HierarchicalTenant;
})
// ... other AuthP setup methods left out.As well as setting the type of the tenant type this also registers the GetDataKeyFilterFromUser against the IDataKeyFilter interface - see Creating a multi-tenant app for how you can use this service.
NOTE: See Multi tenant explained of more on these two types of multi-tenant feature.
- Intro to multi-tenants (ASP.NET video)
- Articles in date order:
- 0. Improved Roles/Permissions
- 1. Setting up the database
- 2. Admin: adding users and tenants
- 3. Versioning your app
- 4. Hierarchical multi-tenant
- 5. Advanced technique with claims
- 6. Sharding multi-tenant setup
- 7. Three ways to add new users
- 8. The design of the sharding data
- 9. Down for maintenance article
- 10: Three ways to refresh claims
- 11. Features of Multilingual service
- 12. Custom databases - Part1
- Videos (old)
- Authentication explained
- Permissions explained
- Roles explained
- AuthUser explained
- Multi tenant explained
- Sharding explained
- How AuthP handles sharding
- How AuthP handles errors
- Languages & cultures explained
- JWT Token refresh explained
- Setup Permissions
- Setup Authentication
- Startup code
- Setup the custom database feature
- JWT Token configuration
- Multi tenant configuration
- Using Permissions
- Using JWT Tokens
- Creating a multi-tenant app
- Supporting multiple languages
- Unit Test your AuthP app