【发布时间】:2017-01-19 13:49:22
【问题描述】:
在将用户重定向到最终页面之前,我有一个使用 OpenID 身份验证作为中间层的 .net 核心应用程序。
这是 Startup.cs 中的部分代码:
var factory = new IdentityServerServiceFactory();
factory.UseInMemoryClients(Clients.Get())
.UseInMemoryScopes(Scopes.Get())
.UseInMemoryUsers(Users.Get())
.CorsPolicyService = new Registration<ICorsPolicyService>(new InMemoryCorsPolicyService(Clients.Get()));
var identityServerOptions = new IdentityServerOptions
{
SiteName = "Site name",
SigningCertificate = Certificate.Get(),
Factory = factory,
AuthenticationOptions = new IdentityServer3.Core.Configuration.AuthenticationOptions
{
IdentityProviders = ConfigureWsFed,
EnableSignOutPrompt = false,
EnablePostSignOutAutoRedirect = true,
PostSignOutAutoRedirectDelay = 0
},
LoggingOptions = new LoggingOptions()
{
EnableHttpLogging = true,
EnableKatanaLogging = true,
EnableWebApiDiagnostics = true,
WebApiDiagnosticsIsVerbose = true
}
};
这里的问题是,在用户登录并提交密码后,它会将用户重定向到带有“请稍候...”消息的 openId 页面,然后重定向到最终产品页面。
我的问题是:有没有办法以编程方式移除对中间屏幕的重定向?
【问题讨论】:
标签: c# authentication redirect owin openid