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
1 answer

DRUPAL - How can I add user ID (UID) to the activation email oder user page?

How can I add the value user id (uid) from user db in to the activation email? like : "hi XY your ID is :1234" and I would like to print out the id on the user page. thx
Huzur Polat
  • 95
  • 4
  • 11
2
votes
1 answer

Django rest framework with djoser token authentication retrieve user first_name

I am using django rest framework djoser authentication. So what i want is when user login, it will return their user token, promptmsg, status, first_name and last_name. djoser: http://djoser.readthedocs.io/en/latest/introduction.html Now i am able…
Jin Nii Sama
  • 707
  • 1
  • 16
  • 33
2
votes
1 answer

Django rest framework with Djoser token authentication token response

As i am using a third party package called djoser to handle the token authentication. i want to customise the response. But after trying to change it, the result is not what i wanted. I just wanted to get the token value of the token instead of…
Jin Nii Sama
  • 707
  • 1
  • 16
  • 33
2
votes
1 answer

What is the format of the request for authentication to python-eve api

I, basically, have two related questions. In my case, I have a global Mongo authentication as admin with the password pass. I implemented my BCryptAuth as described in this answer, so I can create users without any authentication like this: curl -d…
user1329187
2
votes
1 answer

How to preserve my hash fragment in Angular 2 for openid token

I am using oauth for authentication in my Angular 2 application. After authentication I get all info in the return url after a hash. After routing inside my angular 2 program, the hash part is totally deleted, but I need it. This questions has been…
Donia Zaela
  • 317
  • 1
  • 4
  • 15
2
votes
2 answers

Laravel 5.5. sharing sessions

I have CSRF token issues when communicating in this manner subdomain --> domain I have set the session.php to have a value "domain" => "." . env('APP_URL'), and when I inspect cookies, they do have a value of .example.com. Even with this, I am…
Norgul
  • 4,613
  • 13
  • 61
  • 144
2
votes
1 answer

Angular Http Request .subscribe() cause an infinite loop

I want to write a function loggedIn() in file auth.service.ts to check the token from local storage, and then verify it with firebase/php-jwt in server side. But the code in Typescript gives an infinite loop. Here is my…
Greyson Yee
  • 156
  • 3
  • 11
2
votes
3 answers

How can i generate token in php using developer key , application id and username?

Anyone can describe how i generate token in php using developer key, application id and username. Videyo provide only html js, they haven't any support for php. Please hint me. The token length is 200 plus.
Chirayu Vyas
  • 67
  • 11
2
votes
2 answers

Python : How to tokenize from file?

I'm a newbie in python. I would like to know how to tokenize twitter data from file. My code is : with codecs.open('example.csv', 'r',"utf-8") as f: for line in f: tweet = f.readlines() tokens = word_tokenize(tweet["text"]) …
Zayajung C
  • 43
  • 1
  • 3
2
votes
3 answers

Adding data to JWT from the client-side

I'm new using JWTs. I have an API that generates a JWT for the clients to be authenticated for further requests. My JWT has a property that returns the user id: { jwt: { exp: "2017-12-12 00:00:00", data: { user_id: 491 } …
andresscode
  • 1,415
  • 1
  • 10
  • 23
2
votes
1 answer

Django rest framework json web token logout function

First of all, i am still new to django rest framework jwt so pls excuse my stupidity if im wrong. Im wondering about how to create a logout function for jwt as when user want to logout and switch account, they will need this function. Based on the…
Jin Nii Sama
  • 707
  • 1
  • 16
  • 33
2
votes
0 answers

Security in Webservice without login credentials

I'm development a SOAP web service version 1.1 in Java. I have the following situation: there's a secured channel with ssh; customers don't have login credentials (they don't have username and password); when a customer opens an account is…
2
votes
0 answers

Duration token android

I was wondering, for a phone app using token authentication. What would be the maximum duration of the token ? It's an app that might be used daily by the user, and I don't know how long should be the token's validity. I was thinking of setting…
Lucas Tambarin
  • 395
  • 3
  • 14
2
votes
1 answer

Paypal Rest API - Token life time from approval URL

I use Paypal Rest API and my question is: How long is token from approval URL valid? I want to store this token (also with my token) to the database and generate link with my token. Later if I click to this link (replace my token with paypal token)…
Petr Gürth
  • 47
  • 1
  • 5
2
votes
1 answer

How to get valid token from api from auth0 client?

I am using emberjs with auth0 to log in. Normally I enter username and password and I get a valid token which I send to api etc. Now, I want to write some tests on api and I always need a valid token. My token expires in a day. So to run tests I…
Adrian
  • 169
  • 1
  • 1
  • 12