中添加授权页面
我正在使用剃须刀页面的ASP.NET核心作为客户端工作正常工作,但是当我尝试部署到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
}
它是由我解决的,我需要在我的startup.cs client