我们可以配置多个PostLogoutRedirectUris吗

时间:2020-11-02 18:21:56

标签: angular identityserver4

我将以下隐式客户端定义为

     static Client GetImplicitClient(string name, string clientId, string clientSecret, string clientHost)
    {var client = new Client
        {
            ClientName = name,
            ClientId = clientId,
            ClientSecrets =
            {
                new Secret(clientSecret.Sha256())
            },
            AccessTokenLifetime = 7200, // in seconds, set to 1200 minutes, default 60 minutes
            IdentityTokenLifetime = 7200,
            AbsoluteRefreshTokenLifetime = 2592000, // in seconds, set to default, default 30 days
            AllowedGrantTypes = GrantTypes.Implicit,
            AllowAccessTokensViaBrowser = true,
            RequireConsent = false,
            AllowRememberConsent = true,
            BackChannelLogoutSessionRequired = false,
            RedirectUris = new List<string>
            {
                    clientHost + "/silent-renew.html",
                    clientHost + "/auth.html"

            },
            PostLogoutRedirectUris = new List<string>
            {
                    clientHost
            },
            AllowedCorsOrigins = new List<string>
            {
                    clientHost
            },
            AllowedScopes = new List<string>
            {
                    IdentityServerConstants.StandardScopes.OpenId,
                    IdentityServerConstants.StandardScopes.Profile,
                    IdentityServerConstants.StandardScopes.Email,
                    "role",
                    "myAPI",
                    "myAPI.read",
                    "myAPI.write"
            }
        };
        return client;
      }

用户要求可以同时从http:// localhost或公用名https://myweb.mycompany.com:9998访问GUI应用程序。在这种情况下,我需要在RedirectUris,PostLogoutRedirectUris和AllowedCorsOrigins表中添加其他记录集。有人使用过此配置吗?发布注销重定向有效吗?

0 个答案:

没有答案