I am working on asp.net core 2.2. i would like to add basic authentication and jwt authentication on the same project. for example, i will open my API to vendor and i need add basic authentication for the vednors and jwt for site users which access this
api. how do i add multiple authentication on the same API. any example would be highly appreciated.
I am working on asp.net core 2.2. i would like to add basic authentication and jwt authentication on the same project. for example, i will open my API to vendor and i need add basic authentication for the vednors and jwt for site users which access this
api. how do i add multiple authentication on the same API. any example would be highly appreciated.
Configuring multiple authentication schemes is covered in the official ASP.NET Core docs.
Member
141 Points
921 Posts
Help needed in Authentication
Sep 25, 2019 01:49 AM|born2win|LINK
Hi,
I am working on asp.net core 2.2. i would like to add basic authentication and jwt authentication on the same project. for example, i will open my API to vendor and i need add basic authentication for the vednors and jwt for site users which access this api. how do i add multiple authentication on the same API. any example would be highly appreciated.
All-Star
53001 Points
23587 Posts
Re: Help needed in Authentication
Sep 25, 2019 07:10 PM|mgebhard|LINK
Configuring multiple authentication schemes is covered in the official ASP.NET Core docs.
https://docs.microsoft.com/en-us/aspnet/core/security/authorization/limitingidentitybyscheme?view=aspnetcore-3.0&tabs=aspnetcore2x
Member
141 Points
921 Posts
Re: Help needed in Authentication
Sep 27, 2019 06:17 PM|born2win|LINK
thank you