Three small modules
First, the login module (front-end recommended using Verify sliding module verification )
Background generate random Locations + temporary notes in a dictionary type in Redis (expires 5 minutes) return value: Random position, temporary ticket, background image URL
Front desk verification via and login request Body{name: "321", PWD: "Md5 Encryption"} Head{theid: "Temporary Ticket", postion: "Sliding Position"}
II: Authorization
Background verification location and login information by destroying the temporary ticket and generating the login ticket (token) and the user basic information has been stored in the dictionary form in Redis (Expiration time 15 minutes) and return to the front Token
Three: Validation
Front token is saved to head for each request on tape
Backend gets tokens in the middleware and determines if there are any in Redis
Presence execution
There is no access denied
Architecture design of ASP. NET Core Login Module