简体   繁体   中英

ASP.NET Identity with Multi Tier Architecture

I have a web application into which I would like to utilize asp.net identity. The setup itself within my asp.net MVC project with the provided templates is rather straightforward. However it uses EF in the web "tier". Our company requires us to use a "n" tier architecture approach whereby all data access and business logic is physically separated onto a separate server and all logic is exposed via REST apis. I want to utilize the .net identity framework as it has everything I need but how can i extend it to access the database via a REST api? It appears to be very tightly coupled and I dont see how to separate it out. I have seen similiar questions asked but they lead no where and with no resolution. Any samples or guidance is appreciated.

This is an opinion, but you have three basic sets of functionality in your description.

  1. UI (MVC, Angular, React)
  2. Data Tier (Web API)
  3. Authentication/Authorization (IdentityServer)

Your front-end (1) authenticates with the id tier (3) and gets back a token with your user claims (Authorization). Front end (1) passes token with request to data tier (2) which checks with id server (3) to make sure token is valid and then services the request.

Edit: EF would go in the Data tier, just to be Cap'n Obvious.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM