【问题标题】:Identity Server 4 cant given grant AccessIdentity Server 4 无法授予访问权限
【发布时间】:2018-08-06 22:42:04
【问题描述】:

我使用带有 Razor 页面的 Asp.net Core 作为客户端运行良好,但是当我尝试部署到 Azure Identity Server 时,它不会授予对 Web 客户端的访问权限。

Config.cs:

 new Client
            {
                /*
                ClientId = "mvc",
                ClientName = "MVC Client",
                AllowedGrantTypes = GrantTypes.Implicit,

                // where to redirect to after login
                RedirectUris = { "http://myip/signin-oidc" },

                // where to redirect to after logout
                PostLogoutRedirectUris = { "http://myip/signout-callback-oidc" },

                AllowedScopes = new List<string>
                {
                    IdentityServerConstants.StandardScopes.OpenId,
                    IdentityServerConstants.StandardScopes.Profile
                }
                */
                ClientId = "webapp2", 
                ClientName = "web with openid",
                AllowedGrantTypes = GrantTypes.HybridAndClientCredentials,

                ClientSecrets =
                {
                    new Secret("web123".Sha256())
                },

                RedirectUris           = { "http://myip/signin-oidc" },
                PostLogoutRedirectUris = { "http://myip/signout-callback-oidc" },

                AllowedScopes =
                {
                    IdentityServerConstants.StandardScopes.OpenId,
                    IdentityServerConstants.StandardScopes.Profile,
                    "masterdataapi",
                    "transactionapi"
                },
                AllowOfflineAccess = true
            }

【问题讨论】:

    标签: asp.net asp.net-identity identityserver4 razor-pages


    【解决方案1】:

    我解决了,我需要在我的 startup.cs 客户端中添加授权页面

    【讨论】:

      猜你喜欢
      • 2018-12-20
      • 2015-09-09
      • 2018-11-13
      • 1970-01-01
      • 1970-01-01
      • 2017-10-30
      • 1970-01-01
      • 2020-04-28
      • 1970-01-01
      相关资源
      最近更新 更多