Reputation: 13
I have 3 applications, one is desktop application and this is my client, second is my Web Api to secure and the last one is api which checks if the user with password exists.
In my case I want to connect this flow with Azure AD.
I think this should work like this: 1.DesktopApplication sending request with clientid,clientsecret, username and password to AZURE 2.Azure sending request with username and password to my api where I can check this user exist if exist I will return "true"(or somthing like this) 3. If api return "true" Azure can return to DesktopApplication token 4. DoesktopApplication will send request ot secure Web Api with token 5.DesktopApplication recive content from secure Web Api
Api in 3 point is not same api in 5 point.
Is it posible to do this flow with Azure AD or not? And if not can I do something with my flow something to secure Web Api by Azure and still store users in my old db(oracle)?
Upvotes: 0
Views: 135
Reputation: 58773
It would be better to use OpenID Connect authentication flows to authenticate the user and acquire a token that way.
The approach you are suggesting has a few downsides:
So it would be better to use a flow like this:
It will show the user a pop-up window where they can login, and as a result you'll get an Id token (which tells your desktop app who the user is) and an access token for the API.
Upvotes: 1