我已经尝试在Startup.cs上应用了几种设置,如给定链接所示:
https://identityserver4.readthedocs.io/en/latest/quickstarts/2_interactive_aspnetcore.html
但不幸的是,当我检查以下url时,我无法为Authority参数设置基本url:
https://my-pc-id:8085/_configuration/MyApp.WebUI
这似乎很奇怪,因为如果我们不能设置这个参数,为什么在这个配置上有这样一个选项?
using System.IdentityModel.Tokens.Jwt;
// ...
JwtSecurityTokenHandler.DefaultMapInboundClaims = false;
services.AddAuthentication(options =>
{
options.DefaultScheme = "Cookies";
options.DefaultChallengeScheme = "oidc";
})
.AddCookie("Cookies")
.AddOpenIdConnect("oidc", options =>
{
options.Authority = "my-pc-id:8085";
options.ClientId = "mvc";
options.ClientSecret = "secret";
options.ResponseType = "code";
options.SaveTokens = true;
});
发布于 2021-01-20 19:40:24
如下所示更改Authority
属性:
// base-address of your identityserver
.Authority = "https://my-pc-id:8085/_configuration/MyApp.WebUI";
https://stackoverflow.com/questions/65815928
复制相似问题