IdentityServer 多 IDP 配置请求

IdentityServer multi IDP configuration request

如何创建使用 Saml 或 Google IDP 进行授权的请求?我的理解是,如果我将 "acr_values=idp:Google" 放入我的请求中,那么该请求将通过我的 Google Idp 路径进行路由。同样,如果我输入 "acr_values=idp:saml2p",它应该通过我的 Saml Idp。这是一条不同的道路吗?现在请求转到 localhost:98575/connect/token。

这是我当前的请求:

POST /connect/token HTTP/1.1
Host: localhost:98575
Authorization: Basic  SomethingEncrypted
Cache-Control: no-cache
Postman-Token: AGuid
Content-Type: application/x-www-form-urlencoded

grant_type=password&scope=customScope+openid+offline_access&username=actuallyfoobar@enterprisebeta.com&password=SomePassword&acr_values=idp:Google

这是我的 IdentityServer Starup.cs 文件中的一个片段:

public static void ConfigureIdentityProviders(IAppBuilder app, string signInAsType)

    {
        var authServicesOptions = new KentorAuthServicesAuthenticationOptions(false)
        {
            SPOptions = new SPOptions
            {
                EntityId = new EntityId("http://sp.example.com")
            },

            SignInAsAuthenticationType = signInAsType,
            AuthenticationType = "saml2p",
            Caption = "SAML2p",
        };

        authServicesOptions.IdentityProviders.Add(new IdentityProvider(
            new EntityId("http://stubidp.kentor.se/Metadata"),
            authServicesOptions.SPOptions)
        {
            LoadMetadata = true,
        });

        app.UseKentorAuthServicesAuthentication(authServicesOptions);

        var google = new GoogleOAuth2AuthenticationOptions
        {
            AuthenticationType = "Google",
            Caption = "Google",
            SignInAsAuthenticationType = signInAsType,

            ClientId = "767400843187-8boio83mb57ruogr9af9ut09fkg56b27.apps.googleusercontent.com",
            ClientSecret = "5fWcBT0udKY7_b6E3gEiJlze"
        };
        app.UseGoogleAuthentication(google); 

acr_values 和 "idp:foo" 仅用于授权端点,不用于令牌端点。 IOW,它仅用于自动将浏览器中的用户重定向到指定的外部身份提供者。