2017-09-28 62 views
0

我有具有使用microsoft.aspnet.identity 2.2IdentityServer 4与旧的WebForms网站

我们想扩大网站的许多关键业务用户的旧的WebForms网站,但将使用微服务型架构做这个。我们想要启动新的.NET核心服务,但他们需要能够连接到这个充满用户的传统数据库。通过这个我的意思是能够共享登录(所以用户不需要两次登录两次btn的各种微服务)

是站立IdentityServer的最佳方式(在自己的某个地方 - 可能托管在AWS中)它连接到这个数据库中,然后让:

1)Web表单来验证它

2)未来.NET芯微的服务可以权威性呢?

目前,我们有这个对于我们的应用程序:

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 

回答