【问题标题】:How to setup OpenIdConnectAuthentication outside of the app start如何在应用程序启动之外设置 OpenIdConnectAuthentication
【发布时间】:2017-06-11 00:49:26
【问题描述】:

是否可以在应用程序之外的某个地方配置 OpenIdConnectAuthentication,例如 API 控制器,以便能够进行多种身份验证,例如 google 或 facebook 和 OpenId Connect,并且还能够根据我们的需要打开或关闭它?

【问题讨论】:

    标签: openid azure-active-directory openid-connect


    【解决方案1】:

    您必须在应用启动时配置 OWIN;但是,您可以在 app start 中配置您想要支持的所有不同提供商的场景。

    【讨论】:

      【解决方案2】:

      您提到的 OpenIdConnectAuthentication (Microsoft.Owin.Security.OpenIdConnect.OpenIdConnectAuthenticationMiddleware) 是一个 OWIN 中间件。支持 OWIN 的 Web 应用程序从多个步骤开始,您可以在链接here 中查看详细步骤。

      能够进行多种身份验证,例如 google 或 facebook 和 OpenId Connect,并且还能够根据我们的需要打开或关闭它吗?

      您可以考虑使用支持 Facebook、Google+、LinkedIn 和 Amazon 的 Azure AD B2C 租户,您可以从 Azure 门户轻松配置身份提供者。有关 Azure AD B2C 的更多详细信息,您可以查看此link

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2010-10-15
        • 2011-07-01
        • 1970-01-01
        相关资源
        最近更新 更多