【发布时间】:2017-09-29 07:18:59
【问题描述】:
我有一个旧的网络表单站点,其中有许多使用 microsoft.aspnet.identity 2.2 的关键业务用户
我们希望扩展站点,但将使用微服务类型的架构来实现此目的。我们希望启动新的 .NET 核心服务,但它们需要能够连接到这个充满用户的旧数据库。我的意思是能够共享登录信息(因此用户不需要在各种微服务中登录两次)
是建立连接到该数据库然后允许的 IdentityServer(在其自身的某个地方 - 可能托管在 AWS 中)的最佳方式:
1) 对其进行身份验证的网络表单
2) 未来的 .net core 微服务可以认证吗?
目前我们的应用程序有这个:
app.CreatePerOwinContext(ApplicationDbContext.Create);
app.CreatePerOwinContext<ApplicationUserManager>(ApplicationUserManager.Create);
app.CreatePerOwinContext<ApplicationSignInManager>(ApplicationSignInManager.Create);
// Enable the application to use a cookie to store information for the signed in user
// and to use a cookie to temporarily store information about a user logging in with a third party login provider
// Configure the sign in cookie
app.UseCookieAuthentication(new CookieAuthenticationOptions
{
AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
LoginPath = new PathString("/Account/Login"),
SlidingExpiration = true,
CookieName = ".AspNet.SomeName"
});
// Use a cookie to temporarily store information about a user logging in with a third party login provider
app.UseExternalSignInCookie(DefaultAuthenticationTypes.ExternalCookie);h section
【问题讨论】:
标签: identityserver3 identityserver4