Often in programming I meet this name or phrase like "I get token"

What does it mean?

  • 3
    token, one-time pass. - zb '
  • one
    @dfhsfhgfj Online token ring? Or where? - alexlz

3 answers 3

The term token has many different meanings. One of the meanings is explained in the @Heidel post, but this is only one of the meanings, and not the most frequent one.

In the context of the question most likely we are talking about a slightly different sense.

A token is understood as the replacement of an object with a certain designation / identifier (often just an integer or string). For example: session id is a classic token. Tokens are widely used usually in authorization / identification systems and so on. Technically, they are usually implemented as a record in the database, where the token is the identifier of the record about the user data or the access granted. Usually in this case, the token is calculated as a hash of a combination of user data (login), creation time and server keys and so on.

The meaning of all this canoe is that instead of transferring a whole host of different data to the user, it is enough to give him a token and say: here's a token for you and you can do everything you need with it. This is both convenient and less risk of data exposure.

    A token is something that a user must have to access a resource. For example, access to the server can be organized through the Token.dat file for each user. Each user needs to give out his personal file Token.dat, which contains a complete list of the necessary data to access the resource, such as the address and port of the server, the user ID and its key.

      Token (token) - the minimum unit of the language, which has an independent meaning. There are the following types of tokens

      • names (identifiers);
      • keywords;
      • operations signs;
      • separators;
      • literals (constants).