2017-02-09 7 views
0

savetokensfalseに設定されている場合、PostLogoutRedirectUrisは機能しません。これら2つの関係は何ですか?あなたがログアウトスペックSaveTokensとPostLogoutRedirectUrisとの間に関連はありますか?

https://openid.net/specs/openid-connect-session-1_0.html#RedirectionAfterLogout

をチェックすると、私はあなたがid_tokenをリダイレクトできるようにするには、ログアウト時に必要であること、がわかりますasp.netコア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" 
    }, 

    } 

答えて

0

でidentityserver4 1.1を使用しますクライアントアプリケーションに戻ります。

SaveTokensこれはまさにあなたのためのものです。トークンをクッキーに保存し、ログアウト時にOPに送り返します。

+0

ありがとう – Ali

関連する問題