Microsoft.AspNetCore vs Microsoft.IdentityModel (ADAL) with .net core API in Azure AD

六月ゝ 毕业季﹏ 提交于 2019-12-06 05:52:11

ADAL and MSAL are the libraries needed for requesting and managing tokens. If you're building an API that protects it's endpoints and requires an access token to access, you likely only need to use the .NET core middleware (what was included in the template). This middleware accepts and validates incoming access tokens.

The only case you'll need to integrate ADAL or MSAL into your app is if you're interested in doing the On-behalf-of flow from your web API.

Here's a code sample that implements this middleware in an .NET core API.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!