Ends in:
5 DAYS
11 HRS
20 MIN
6 SEC
Ends in:
5 D
11 H
20 M
6 S
Open Closed

Best approach on consuming API backend in Windows Forms app #8230


User avatar
0
bmulinari created
  • 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 with IIdentityModelAuthenticationService for authentication
  • HttpClient with IdentityModel 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)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Both Dynamic C# API Client Proxies and Static 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

  • User Avatar
    0
    rcalv002 created

    hi

    Both Dynamic C# API Client Proxies and Static 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?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    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

  • User Avatar
    0
    rcalv002 created

    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?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    I don't quite understand your case, but you can try using Dynamic C# API Client Proxies or Static C# API Client Proxies. If you have any problems, please feel free to give feedback.

    Thanks.

Made with ❤️ on ABP v9.1.0-preview. Updated on November 26, 2024, 12:49