简体   繁体   中英

ASP.NET Core Web API + Azure AD Authentication

I need some help with implementing authorization infrastructure for my application.

I have a Angular SPA application that works with a Web API. This Web API in turns uses another Web API to serve its request. So, I have totally 2 Web APIs and a Angular SPA application.

I want the users of the Angular SPA application to be authenticated by our Azure AD account, and then share this token with other two Web APIs to authenticate the requests.

Please advise how to go about it, any thoughts are much appreciated.

So the flow looks like:

1.Sign-in the user in the SPA application.

2.Acquire a token to A Web API and call it.

3.A Web API then calls B Web API.

Take a look at this sample . It uses the On-Befalf-Of flow which applies to your scenario.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM