Current location - Quotes Website - Signature design - What is token authentication?
What is token authentication?
Token means that the client frequently requests data from the server, and the server frequently goes to the database to query and compare the user name and password, judge whether the user name and password are correct, and make corresponding prompts. In this context, Token came into being. Token is a string of strings generated by the server, which is used as a token for the client to make a request. The first time you log in, the server generates a token and returns it to the client. In the future, the client only needs to bring this token to request data, and no user name and password are needed.

Extended data:

In fact, token can be called a password. Before transmitting some data, it is necessary to check the password and authorize different passwords for different data operations. For example, four types of data packets are defined in USB 1. 1 protocol: token packet, data packet, handshake packet and special packet. The continuous data exchange between host and USB device can be divided into three stages. In the first stage, the host sends a token packet, and different token packets have different contents (different passwords), which can tell the device to do different jobs. In the second stage, the data packet is sent, and in the third stage, the device returns the handshake data packet.

References:

Baidu encyclopedia token