问题
I am trying to figure out whether the following is possible and how can it be done: Implementing individual user accounts login enabled for Web Api in .Net Core using IdentityServer4, providing the following capabilities: - Generating access tokens, - Generating refresh tokens, - Enabling social logins, - Enabling roll-based authorization - Using local database for storage (EntityFramework...)
I wasn't able to get this under control using the available documents, I was wondering if anybody has done something similar before or knows where to start.
回答1:
I've created a proof of concept project. To make a long story short clone the project https://github.com/ChrisRichner/CoreWebApp.Quickstart and start playing with the following features immediately.
- AspNetCore 1.0
- https Kestrel (uncomment Code for https)
- Thinktecture IdentityServer4
- AspNetIdentity
- EntityFrameworkStorage
- Social Logins (Google, Twitter)
- Swagger
- IdentityServer OAuth Integration
- Unit Tests based on XUnit
Enjoy!
来源:https://stackoverflow.com/questions/39644055/identityserver4-net-core-web-api-implementing-individual-user-accounts-with-s