Identityserver4 使用多个外部身份提供程序的identity server 4

Identityserver4 使用多个外部身份提供程序的identity server 4,identityserver4,Identityserver4,我想将identity server 4与一系列不同的外部身份提供者一起使用。不止一个。 例如:一家企业可能会将ADF用于其EIP,另一家企业将使用AZURE标识,等等。在此场景中,只有一个identity server实例访问不同的外部id提供程序 这可能吗?或者有人试过吗。如果没有,您是否知道有这样的服务。当然这是可能的。您可以在Startup类中注册任意数量的外部IdP。请确保还可以从Identityserver中查看示例quickstart存储库 此代码将AzureAd和Google注册

我想将identity server 4与一系列不同的外部身份提供者一起使用。不止一个。 例如:一家企业可能会将ADF用于其EIP,另一家企业将使用AZURE标识,等等。在此场景中,只有一个identity server实例访问不同的外部id提供程序


这可能吗?或者有人试过吗。如果没有,您是否知道有这样的服务。

当然这是可能的。您可以在Startup类中注册任意数量的外部IdP。请确保还可以从Identityserver中查看示例quickstart存储库

此代码将AzureAd和Google注册为外部IdP。 在设置之前,您必须在developers.google和AzureAd中注册您的应用程序以授权您的应用程序

    app.UseOpenIdConnectAuthentication(new OpenIdConnectOptions
    {
        ClientId = Configuration["AzureAd:clientid"],
        Authority = Configuration["AzureAd:authority"],
        ClientSecret = Configuration["AzureAd:secret"],
        PostLogoutRedirectUri = "/signed-out",
        AuthenticationScheme = "AzureAd",
        ResponseType = OpenIdConnectResponseType.CodeIdToken,
        SaveToken = true,
    });

    app.UseGoogleAuthentication(new GoogleOptions
    {
        ClientId = Configuration["Google:clientid"],
        ClientSecret = Configuration["Google:secret"],
        AuthenticationScheme = "Google",
        SaveTokens = true
    });

跟芬巴克有关吗?