本文介绍了使用Azure应用服务Easy Auth + Azure AD B2C是否可以保护单个Web API并让多个本机应用使用它?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个Web API,旨在为多个业务合作伙伴提供服务,每个业务合作伙伴都将自定义本机应用程序客户端的白标版本.

We have a Web API intended to serve multiple business partners, each of which will be customizing a white label version of our native app client.

我们还有一个Web API,可为不同的应用程序提供通用功能.

We also have a Web API offering common functions to different apps.

我们希望使用AD B2C作为身份和身份验证系统,但无法了解如何或是否可以使用AD B2C保护多个应用程序的通用API.这可以实现吗?

We would like to use AD B2C as the identity and auth system, but cannot see how or if it is possible to use AD B2C to secure a common API for multiple apps. Is this achievable?

推荐答案

这取决于您希望合作伙伴使用帐户登录的方式.如果您希望合作伙伴使用您拥有的Azure AD B2C中的使用者帐户或本地帐户登录,则答案是肯定的.

It depends on how you want to your partners usig the account login-in. If you expected that the partners login-in using the consumer account or local account in the Azure AD B2C you own, the answer is yes.

Azure AD B2C从2017年3月23日开始支持访问令牌(请参考此处).它支持多种类型的客户端,包括Web应用程序,桌面和移动应用程序,单页应用程序,服务器端守护程序以及其他Web API.

The Azure AD B2C supports the Access Tokens from March 23, 2017(refer here). And it supports many types of clients, including web apps, desktop and mobile apps, single page apps, server-side daemons, and other web APIs.

为一个或多个本机应用程序开发Web API服务器是相同的,您只需要在B2C租户中注册多个应用程序即可.有关为Azure AD B2C获取访问令牌的更多详细信息,您可以参考下面的链接:

It is same to develop an web API server for one native app or multiples apps, you only need to register the multiple apps in your B2C tenant. More detail about acquring the access token for the Azure AD B2C, you can refer the link below:

Azure Active Directory B2C:OAuth 2.0授权代码流

这篇关于使用Azure应用服务Easy Auth + Azure AD B2C是否可以保护单个Web API并让多个本机应用使用它?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-25 01:09