Questions tagged [token]

A token is a string of characters, categorized according to the rules as a symbol (e.g., IDENTIFIER, NUMBER, COMMA). The process of forming tokens from an input stream of characters is called tokenization, and the lexer categorizes them according to a symbol type. A token can look like anything that is useful for processing an input text stream or text file.

A token is the smallest part of an input text with a meaning. A token may be a single character, a symbol, a word or anything that is useful for processing an input text. Tokens are used in processing programming languages or natural languages.

The process of forming tokens from an input stream is called tokenization or lexical analysis. A program or function which performs lexical analysis is called a lexical analyzer, lexer, or scanner.

7573 questions
2
votes
0 answers

Auth0 lock authorization flow with backend

How would the flow look like if the token exchange should happen on the backend but the authorization is triggered from the Auth0 lock on a React Web app? I have configured the redirect URL to be a the endpoint of the backend. Using the code query…
Mahoni
  • 7,088
  • 17
  • 58
  • 115
2
votes
1 answer

The MVC action controller generates a url with a token for the user to click on and view the page without logging in

I need to send the user a url with a token so that the user can click on that link and view my page without logging in to the system. This user has been created in my system, but has not set a password, I want this user not to see the other pages…
Tran Audi
  • 587
  • 1
  • 6
  • 22
2
votes
0 answers

How do you authenticate long term tokens API Tokens?

So I have created an API that uses Token Authentication. The API is currently being used mainly from the FE application so the token is created upon Login, stored in the FE user session and send over to API through the header on every request. Now I…
czioutas
  • 1,032
  • 2
  • 11
  • 37
2
votes
3 answers

User RegEx to (un)match all words length above a specific value

Question on Java RegEx: I have a tokenizer where i want to return only tokens that have length above a certain length. For example: I need to return all tokens that are more than 1 char in this text: "This is a text ." I need to get 3 tokens:…
Samer Aamar
  • 1,298
  • 1
  • 15
  • 23
2
votes
2 answers

How to set token authentication via AJAX in Django to secure the API url

I am using Django REST framework to have data available in JSON and using them to refresh the page via AJAX. How can I secure the URL that page is being updated with data and no one can access the API url. The url is visible in AJAX in html so it…
Radek
  • 1,149
  • 2
  • 19
  • 40
2
votes
1 answer

Play2.5 - alternative to play.api.libs.Crypto.generateToken

For generating token, I have been relying on play.api.libs.Crypto.generateToken successfully. However it is now deprecated and the migration guide is not very clear to me. Could anybody tell me: which library I should include, preferable as sbt…
John
  • 4,786
  • 8
  • 35
  • 44
2
votes
2 answers

How to get os.Args-like tokens from a command line string

I have a string variable: commandLineString := `echo -n "a b c d"` I want to covert it to: args := []string{"echo", "-n", "\"a b c d\""} How can I do it?
chengbin du
  • 512
  • 4
  • 13
2
votes
1 answer

Gitlab: docker login via token fails

I'm trying to use gitlab CI runner, but I do get this error trying to login with tokens. $ docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY Warning: failed to get default registry endpoint from daemon (Got permission denied while trying…
user3142695
  • 15,844
  • 47
  • 176
  • 332
2
votes
1 answer

Get Twitch channel ID from Python

It just says {"error":"Unauthorized","status":401,"message":"error getting authorization token"}, don't know why as I can write on chat with my token. Here's the code: url = "https://api.twitch.tv/kraken/channel" channel_id =…
2
votes
1 answer

ElasticSearch match score

I have a simple field of type "text" in my index. "keywordName": { "type": "text" } And I have these documents already inserted : "samsung", "samsung galaxy", "samsung cover", "samsung charger". If I make a simple "match" query,…
Gun
  • 501
  • 8
  • 27
2
votes
0 answers

Redirect to page, pass auth bearer token in header

I have a simple log in form which POSTs to /token, retrieves the token and stores it in a local javascript variable. On the success of this $.ajax() POST I want to redirect to /About, but I need to pass the token in the header of the redirect,…
cdsln
  • 830
  • 1
  • 11
  • 33
2
votes
4 answers

sed token from : delimited string

I tried searching for an answer but lost in questions. Basically I have a shell script as follows: #!/bin/ksh if [ $# -eq 1 ]; then exit -1 fi processInfo $1 At this point, processInfo returns a string of…
Kiran
  • 993
  • 2
  • 9
  • 14
2
votes
1 answer

Apache Jmeter - The CSRF tokens do not match

I have recorded basic Apache Jmeter scenario with html login form which uses csrf tokens. Sample token recorded by application looks as follows:
Vincent Chang
  • 65
  • 1
  • 4
2
votes
0 answers

Getting user token just using the email on server side (Firebase)

My question is this: I´m trying to send a push notification to a group of devices, I have a node of all the users and their current Firebase tokens. When a user sends a message to a group of devices, I read each value of each user email and get…
Andrey Solera
  • 2,311
  • 2
  • 26
  • 51
2
votes
3 answers

One Definition Rule: Can corresponding entities have different names?

I read and reread the relevant clauses about ODR in the C++ standard, but this question still remains open to me. The standard says that the definition of an inline function shall appear in every translation unit in which it is used, and the…
Armen Tsirunyan
  • 130,161
  • 59
  • 324
  • 434