我使用Asp.net Core并将Razor页面作为客户端工作得很好但是当我尝试部署到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
}
答案 0 :(得分:0)
它由我解决,我需要在我的startup.cs客户端
中添加授权页面