Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

API - Authenticate #3976


User avatar
0
pankajmathur created

Hi,

In the MVC5.X version the Account/Authenticate API's parameter was TenantName, UserID and Password.

Recently we migrated to .Net Core With Jquery version. In this version we see that we need to pass the TenantID in the header in /api/TokenAuth/Authenticate function and then further in the subsequent API we need to pass the TenantID in the header.

We are bit confuse here. How the API consumer (In our case it is the mobile device running Mobile POS APP) will come to know the tenant id that he is supposed to pass in the header.

Please help us.

Regards, Mahendra


2 Answer(s)
  • User Avatar
    0
    pankajmathur created

    Further I saw an API called /api/services/app/Account/IsTenantAvailable. Do I suppose to first get the TenantId by passing the TenantName in the above API and then further Authenticate by passing the TenantId?

    Is there no such API similar to MVC5.X version that will ask me the TenantName, User and Password and returns me the Token that I can use in my subsequent APIs.

    Regards, Mahendra

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @pankajmathur,

    Yes, we have changed the approach for determining tenant when moving to ASP.NET Core. This saves us from putting tenancy name input in many pages and some server side code.

    If you want to use TenancyName approach like MVC 5.x version, you need to change the existing codes but I suggest you to use this approach.