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
76
votes
4 answers

How to get a Token from a Lucene TokenStream?

I'm trying to use Apache Lucene for tokenizing, and I am baffled at the process to obtain Tokens from a TokenStream. The worst part is that I'm looking at the comments in the JavaDocs that address my…
Eric Wilson
  • 57,719
  • 77
  • 200
  • 270
74
votes
4 answers

JWT Token authentication, expired tokens still working, .net core Web Api

I'm building a .net core web api. Preface - I've implemented token authentication as per https://stormpath.com/blog/token-authentication-asp-net-core and https://dev.to/samueleresca/developing-token-authentication-using-aspnet-core. I've also read a…
Jamadan
  • 2,223
  • 2
  • 16
  • 25
72
votes
8 answers

C# unsupported grant type when calling web api

I am trying to perform a Post to my WebAPI from a c# WPF desktop app. No matter what I do, I get {"error":"unsupported_grant_type"} This is what I've tried (and I've tried everything I could find): Also dev web api currently active for testing:…
OverMars
  • 1,077
  • 3
  • 16
  • 33
72
votes
7 answers

How can a Jenkins user authentication details be "passed" to a script which uses Jenkins API to create jobs?

I have a script that delete and re-create jobs through curl HTTP-calls and I want to get rid of any hard-coded "username:password". E.g. curl -X POST $url --user username:password Considerations: Jenkins CLI (probably not an option). One should be…
HenrikSN
  • 850
  • 1
  • 6
  • 10
67
votes
4 answers

What's the best way to save jwt tokens in flutter apps?

Not just where (eg: SQLite...) but also how (libs, best specific practices)?
zeucxb
  • 1,054
  • 1
  • 11
  • 19
60
votes
5 answers

syntax error near unexpected token `$'in\r''

I'm trying to compile the NIST Biometric Image Software, and I have been having trouble all day. I finally got the source checked out right, and I installed cygwin with no problems (I have used it in the past), but when I went to compile, I get this…
David
  • 621
  • 1
  • 5
  • 4
58
votes
10 answers

Preserve cookies / localStorage session across tests in Cypress

I want to save/persist/preserve a cookie or localStorage token that is set by a cy.request(), so that I don't have to use a custom command to login on every test. This should work for tokens like jwt (json web tokens) that are stored in the client's…
kuceb
  • 16,573
  • 7
  • 42
  • 56
57
votes
5 answers

Laravel: What is "remember_token" in the "users" DB table?

Is it safe to use the remember_token in the users table for authenticating the user into the application? What is the purpose of this token? Currently, I'm using it in forms to check whether the user is logged in - if the token is not present, I…
Onion
  • 1,714
  • 1
  • 23
  • 42
53
votes
2 answers

Conflict between System.IdentityModel.Tokens and Microsoft.IdentityModel.Tokens

I have a conflict when using System.IdentityModel.Tokens : using System; using System.Configuration; using System.Data; using System.Data.SqlClient; using System.IdentityModel.Tokens; using System.IdentityModel.Tokens.Jwt; using System.Text; public…
Cooxkie
  • 6,740
  • 6
  • 22
  • 26
52
votes
2 answers

What is an opaque token?

And what does it mean that they are in a "proprietary format"? I am reading about JWT refresh tokens and they are opaque tokens, but I don't understand the term.
sloneorzeszki
  • 1,274
  • 3
  • 12
  • 22
51
votes
8 answers

Using a string path to set nested array data

I have an unusual use-case I'm trying to code for. The goal is this: I want the customer to be able to provide a string, such as: "cars.honda.civic = On" Using this string, my code will set a value as follows: $data['cars']['honda']['civic'] =…
Anthony
  • 5,275
  • 11
  • 50
  • 86
51
votes
7 answers

What is the exact definition of "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!
pencilCake
  • 51,323
  • 85
  • 226
  • 363
50
votes
8 answers

Use token to push some code to GitHub - "Support for password authentication was removed"

Error message when using git push: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead. remote: Please see…
user16226729
  • 481
  • 1
  • 4
  • 6
50
votes
5 answers

tokens in visual studio: HACK, TODO... any other?

what tokens do you find useful in visual studio? (visual studio 2010 → environment → task list → tokens) currently i have only: HACK - low REVIEW - high TODO - normal WTF - high (only these - deleted some default ones) are you using any…
b0x0rz
  • 3,953
  • 8
  • 52
  • 82
50
votes
6 answers

how to generate a unique token which expires after 24 hours?

I have a WCF Webservice which checks if the user is valid. If the user is valid I want to generate a token which expires after 24 hours. public bool authenticateUserManual(string userName, string password,string language,string token) { if…
Eray Geveci
  • 1,099
  • 4
  • 17
  • 39