Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the exact definition of "Token?"

Tags:

c#

.net

token

I have problem to catch the real meaning of the term 'Token.'

In terms of software development, can you define it generically? (Does it have different meanings in terms of different contexts and languages?)

Thanks!

like image 258
pencilCake Avatar asked Dec 15 '10 09:12

pencilCake


People also ask

What is the token definition?

Definition of token (Entry 1 of 2) 1a : a piece resembling a coin issued for use (as for fare on a bus) by a particular group on specified terms. b : a piece resembling a coin issued as money by some person or body other than a de jure government. c : a unit of a cryptocurrency Bitcoin tokens.

What is a token and what is it used for?

Tokens can be used for investment purposes, to store value, or to make purchases. Cryptocurrencies are digital currencies used to facilitate transactions (making and receiving payments) along the blockchain. Altcoins and crypto tokens are types of cryptocurrencies with different functions.

What is a token example?

1. The definition of a token is a sign, symbol or a piece of stamped metal used instead of currency. An example of a token is someone giving their friend a "best friends" necklace. An example of a token is what someone would use to play video games at an arcade.

What is the origin of the word token?

Etymology. From Middle English token, taken, from Old English tācn (“sign”), from Proto-West Germanic *taikn, from Proto-Germanic *taikną, from Proto-Indo-European *deyḱ- (“to show, instruct, teach”) with Germanic *k rather than *h by Kluge's law.


1 Answers

If you google define:token, you get (amongst others) the following two definitions that seem applicable:

  • an individual instance of a type of symbol; "the word 'error' contains three tokens of `r'"
  • something serving as a sign of something else

If you combine these two, you will land somewhere near what is commonly meant when talking about tokens in programming; a symbol representing something. Pretty vague, yes, but then it's used in many different contexts.

One example: you have an authentication system where a user logs on. When the system has authenticated the user, instead of repeating this process for every request, a token is created that represents the fact that the user is authenticated. This token is then used in subsequent requests. In this case the something is the fact the the user is authenticated, and the token represents this fact.

like image 200
Fredrik Mörk Avatar answered Oct 05 '22 08:10

Fredrik Mörk