Token-based authentication methods

1, the user sends the username and password to the server

2, the server receives the request, verify the user name and password

3. After successful authentication, the server will issue a Token, then the Token is sent to the client.

4, the client after receiving Token can store it up, such as Cookie on the inside or Local storage inside.

5, the user then every request will by Cookie, the Token back to the server.

6, the server receives the request, and then to verify that the client requests inside with the Token, if authentication is successful, it is returned to the client data requests.

 

 

For details of the Token to be self-study supplements do understand, it looks great god guidance.

Guess you like

Origin www.cnblogs.com/mp-0518/p/11202648.html