【发布时间】:2017-03-08 11:48:54
【问题描述】:
我在 google 和 Stack Overflow 中搜索,没有合适的答案可用。
我在客户端应用程序中使用 ReactJs + Redux,.Net WebAPI 用于联系数据库和其他逻辑实现,最后我使用 IdentityServer3 对用户进行身份验证。
点击注销后,我将触发以下 URL:https://localhost:123/core/connect/endsession
new Client
{
Enabled = true,
ClientName = "Super Star Application",
ClientId = "SS",
Flow = Flows.Implicit,
RequireConsent = false,
RequireSignOutPrompt =false,
RedirectUris = new List<string>
{
"http://localhost:111/callback"
},
PostLogoutRedirectUris = new List<string> {"https://www.google.com/"},
AllowedCorsOrigins = new List<string>
{
"http://localhost:111/"
},
AllowAccessToAllScopes=true
}
在 Startup.cs 我有以下代码
app.Map("/core", core =>
{
var idSvrFactory = Factory.Configure();
idSvrFactory.ConfigureUserService("AspId");
var options = new IdentityServerOptions
{
SiteName = "Super Star",
SigningCertificate = Certificate.Get(),
Factory = idSvrFactory,
ProtocolLogoutUrls = new System.Collections.Generic.List<string>()
{
"https://www.google.co.in"
},
AuthenticationOptions = new AuthenticationOptions
{
EnablePostSignOutAutoRedirect=true,
EnableSignOutPrompt = false,
PostSignOutAutoRedirectDelay = 1,
EnableLoginHint = true,
RememberLastUsername = true,
EnableAutoCallbackForFederatedSignout = true,
RequireSignOutPrompt = false
}
};
core.UseIdentityServer(options);
});
我不知道如何重定向到http://www.google.com 而不是下面的屏幕
请帮助我...
【问题讨论】:
标签: c# .net url-redirection logout identityserver3