2

We are developing an API that uses various methods for users to register viz. Facebook, Twitter, Google and also our own Membership system (built using ASP.NET Identity).

We have many large customers that intend to use our platform and have been requesting us to allow us to integrate with them as an OAuth Provider. That will allow their users to get authenticated against their system and then be linked into our system as External accounts. Almost making them another "Facebook" stype provider within our system.

If this was just a single customer, we could simply use OpenIdConnect and set them up in our system. They would provide us with a client_id and a Metadata URL to use and we'd be able to link these users back into our system.

My question is - How would we do this for multiple such customers with each having their own OpenIdConnect client_id and Metadata? Could I use multiple instances of app.UseOpenIdConnectAuthentication settings in my Web API?

I have seen some samples of MultiTenant Windows Azure AD where they obtain the tenant_id from the claims and integrate, but in this case, we can't really use Windows Azure AD.

Could someone help me understand my strategy for implementation?

Any help would be very much appreciated.

Anup

4

1 回答 1

0

假设您的“大客户”数量有限,这就是我的建议。这些客户中的每一个都会获得自己的登录页面来登录,这在大多数情况下是有意义的,并且会在登录时使用大客户 x 按钮。

如果可行,请查看 owin-middleware github 项目https://github.com/owin-middleware/OwinOAuthProviders

我已经能够很快地编写一个额外的 oauth 提供程序(用于 azure Active Directory 的 oauth2),并且这些大客户中的每一个都可能在他们如何实现 oauth 方面有一些细微差别。因此,为每个客户编写一个自定义提供程序,然后您可以轻松地使用 config 来分离租户、clientid 和 secret。

于 2014-08-25T14:57:34.697 回答