Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/asp.net-core/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net core SaveTokens和postLogoutRedirecuturis之间有关系吗?_Asp.net Core_Identityserver4 - Fatal编程技术网

Asp.net core SaveTokens和postLogoutRedirecuturis之间有关系吗?

Asp.net core SaveTokens和postLogoutRedirecuturis之间有关系吗?,asp.net-core,identityserver4,Asp.net Core,Identityserver4,如果savetokens设置为false则postlogutredirecturis不起作用。这两者之间有什么关系?我将identityserver4 1.1与asp.net core 1.1一起使用 app.UseOpenIdConnectAuthentication(new OpenIdConnectOptions { RequireHttpsMetadata = false, ClientId = "openIdConnectClient", Authenticat

如果
savetokens
设置为
false
postlogutredirecturis
不起作用。这两者之间有什么关系?我将identityserver4 1.1与asp.net core 1.1一起使用

app.UseOpenIdConnectAuthentication(new OpenIdConnectOptions
{
    RequireHttpsMetadata = false,
    ClientId = "openIdConnectClient",
    AuthenticationScheme = "oidc",
    Authority = "https://localhost:44309/",
    SignInScheme = "Cookies",
    Scope = { "email" },
    SaveTokens = true
});


 new Client
 {
     ClientId = "openIdConnectClient",
     ClientName = "Example Implicit Client Application",
     AllowedGrantTypes = GrantTypes.Implicit,
     AllowedScopes = new List<string>
     {
         IdentityServerConstants.StandardScopes.OpenId,
         IdentityServerConstants.StandardScopes.Profile,
         IdentityServerConstants.StandardScopes.Email,
     },
     RedirectUris = new List<string>
     {      
         "https://localhost:44378/signin-oidc"
     },
          PostLogoutRedirectUris = new List<string> 
     {
         "https://localhost:44378/signout-callback-oidc" 
     },

  }
app.UseOpenIdConnectAuthentication(新的OpenIdConnectOptions
{
RequireHttpsMetadata=false,
ClientId=“openIdConnectClient”,
AuthenticationScheme=“oidc”,
权威=”https://localhost:44309/",
signnscheme=“Cookies”,
作用域={“电子邮件”},
SaveTokens=true
});
新客户
{
ClientId=“openIdConnectClient”,
ClientName=“示例隐式客户端应用程序”,
AllowedGrantTypes=GrantTypes.Implicit,
AllowedScopes=新列表
{
IdentityServerConstants.StandardScopes.OpenId,
IdentityServerConstants.StandardScopes.Profile,
IdentityServerConstants.StandardScopes.Email,
},
重定向URI=新列表
{      
"https://localhost:44378/signin-oidc“
},
PostLogoutRedirectUris=新列表
{
"https://localhost:44378/signout-回调oidc“
},
}

如果您检查注销规范

您将发现,在注销时需要id_令牌才能重定向回客户端应用程序


SaveTokens
正是为您这样做的-它将令牌存储在cookie中,并在注销时将其发送回OP。

非常感谢您