- ABP Framework version: v8.3.2
- UI Type: Blazor Server
- Database System: EF Core (SQL Server)
Hi there! I'm new to ABP and I wanted to ask for advice on what would be the best approach for consuming our API back-end in a Windows Forms app. This app will run on multiple clients but all will be accessing the same API endpoint in our multi-tenant solution.
As far as I could gather, my options are:
- Dynamic C# API Client Proxies
- Static C# API Client Proxies
HttpClient
withIIdentityModelAuthenticationService
for authenticationHttpClient
withIdentityModel
for OIDC discovery and authentication
Which one do you suggest that would fit my scenario the best? Due to my multi-tenant solution, in all of the approaches above I would need to manually specify the current tenant, is that correct?
5 Answer(s)
-
0
hi
Both
Dynamic C# API Client Proxies
andStatic C# API Client Proxies
can be used.https://abp.io/support/questions/1727/How-to-build-winform-application-client-for-Dynamic-C-API-Client-Proxies
-
0
hi
Both
Dynamic C# API Client Proxies
andStatic C# API Client Proxies
can be used.https://abp.io/support/questions/1727/How-to-build-winform-application-client-for-Dynamic-C-API-Client-Proxies
@mali, I think the question focuses most on the appropriate way to use the same and ensure the client is communicating with the correct tenant.
the service is one saas, and each customer will receive the client application, they will have to plug in some configuration values like the application id/ secret etc. And how to make sure their client only communicates with their tenant data?
-
0
hi
When authenticating a user, you can pass the correct tenant ID. When you call it with the access token, the API will handle the tenant automatically.
https://abp.io/docs/latest/framework/architecture/multi-tenancy#default-tenant-resolvers https://abp.io/docs/latest/framework/architecture/multi-tenancy#change-the-current-tenant
-
0
We don't want a user to login, as our addon will run for many users and all of the communication that addon initiates with the abp backend, should be for the same tenant (but not specific to the user). Our addon will be used by many tenants in the same environment, the tenant's configuration details would be saved in the db the addon connects to (separate from abp) and retrieved on addon startup to make api calls to abp backend using the dynamic proxy application services. Could you help us with a poc for this?
-
0
hi
I don't quite understand your case, but you can try using
Dynamic C# API Client Proxies
orStatic C# API Client Proxies
. If you have any problems, please feel free to give feedback.Thanks.