Question: for controllers/services that don't need tenant. How to bypass the tenant validation
See original GitHub issueFor some controllers, (e.g. /v1/tenants/create) we don’t have the tenant id yet, because in this case, for example, they are actually creating a new tenant.
We were trying not to set the X-TENANT-ID
as null or something just for the sake of it. Is there a way to for certain controllers to bypass the validator? We studied rolling out our own validation, but if/before we do that, I thought it would be better to ask. 😃
Issue Analytics
- State:
- Created a year ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Get TenantInfo in OnConfiguring method of ... - GitHub
I am using separate databases for each tenant and I am following the docs here. I can't make it work to have TenantInfo...
Read more >Azure Active Directory Pass-through Authentication: Quickstart
This article describes how to get started with Azure Active Directory (Azure AD) Pass-through Authentication.
Read more >5 Problems With Tenant Screening Services - RentPrep
There are hundreds of tenant screening services to choose from and it can be overwhelming. In this post we will break down the...
Read more >Overriding Service DTOs : Remove properties #944
Tenants.Default)] public class TenantAppService : SaasHostAppServiceBase, ... Tricky part is I don't want to extend DTO, I want to remove properties
Read more >Anonymous Aware Middleware with Endpoint Routing and ...
If we don't have enough path parts (at least 2) after removing the we return ... The first of these is expected to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Perhaps in this case, the module associated with your route /v1/tenants/create should not import TenancyModule or any other module that imports it. Then you can just create a new mongoose connection, do stuffs you need and close it, or even use the default MongooseModule to connect to a predefined database and inject models in your services. I speak from experience, since I’m doing the same thing you are trying to. With this PR, what would happen with a skipped route that has some service that injects a model using InjectTenancyModel?
That PR above will get the ball rolling I guess.