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
3 answers

how to find i of a token in an array[i]

So, I've found a word in a document and print the line in which the word is present like this: say example file contains : "The quick brown fox jumps over the lazy dog.Jackdaws love my big sphinx of quartz." FileInputStream fstream = new…
user6384481
2
votes
0 answers

How to obtain a device android token with new Firebase Cloud Message

I'm having trouble getting the device token to the notification specifies a device. I'm doing everything I ask the tutorials on the net, including the official guide of Firebase, but I can not get in the log the device token. Would anyone out there…
2
votes
3 answers

Creating Dictionary and Integer Key for List of Strings in Python

I have a list of unicode string lists. Each string list represents a different document with the strings representing the authors' names. Some documents have only one author while other documents can have multiple co-authors. For example, a sample…
Rhymenoceros
  • 119
  • 1
  • 8
2
votes
2 answers

How to Call ASP.NET Web API base on Ajax with GET/POST and Token key

I know how to use Ajax with GET/POST data like as following code but I don’t know how to use it with Token key (Has got a Token key) $("#read1").click(function () { $.support.cors = true; $.ajax({ …
Willie Cheng
  • 7,679
  • 13
  • 55
  • 68
2
votes
1 answer

Unable to return token from AsyncStorage in React Native

I am using React Native's AsyncStorage to store an authorization token, which will be returned when needed to use for new http requests. While I can successfully store it and console log it, I am having some trouble returning the value. I want to…
2
votes
1 answer

Should jwt bearer tokens persist somewhere on the serverside

Looks like jwt token really contains necessary info inside itself and the correctness of this data ensured via cryptographic signatures. Is there any reasons to persist this token somewhere on the server or "issue and forget" policy should be fine?
silent_coder
  • 6,222
  • 14
  • 47
  • 91
2
votes
3 answers

Implementing a token style security when doing GET requests

I'm implementing a temporary and very simple token-style authentication mechanism for an application. The idea is very simple. Whenever a user logs in to the application, a token is returned to the client, which stores it in the sessionStorage data…
nbro
  • 15,395
  • 32
  • 113
  • 196
2
votes
0 answers

Rails: stateless authentication with Devise

I have a working devise user with connected omniauth identity and everything works fine. The problem is that I want to disable sessions and use stateless token authentication. I tried simple_token_authentication and devise_token_auth and experienced…
2
votes
1 answer

preventing CSRF attack on WCF services

How to prevent any possible CSRF attack on my Public WCF soap Service ? i know that the main solution is by using a CSRF Token , but how i can achieve that ? hopefully some one give me idea , or at least to tell me that WCF cannot be CSRF…
2
votes
1 answer

NSURLSession: Getting 401 HTTP error

I am getting "401 Unauthorized access to the endpoint". When I run the same call on POSTMAN (Chrome Extension), it works fine. Even it works fine in my Android app. But here, I am getting the unauthorized access even if I am sending token in…
2
votes
1 answer

How to create token with LDAP authentication in Spring Security

I implemented LDAP authentication with Spring boot and Spring Security. The configuration is pretty straightforward. @Configuration protected static class AuthenticationConfiguration extends GlobalAuthenticationConfigurerAdapter { …
ddd
  • 4,665
  • 14
  • 69
  • 125
2
votes
1 answer

Xamarin.Forms authentication, save logged in status after login, remember me

I'm looking for a good way for my application to know if the person needs to login (again) or not. So meaning, if a person first uses the app, he needs to login. These login credentials are being verified by a webservice I've build. And after he is…
Niels
  • 416
  • 5
  • 22
2
votes
1 answer

Keeping user logged into mobile app after token expiration

After a user has logged in their oauth2 access token is saved on the client system, in this case mobile phone. What is supposed to happen when the token expires? Should the client do periodic checks to make sure the token isn't stale, and if it is…
JimboSlice
  • 55
  • 2
  • 6
2
votes
1 answer

Trace tokes and rules after parser ANTLR 4

I would like to show all tokens and roles that was reached during the parser with Antlr 4, excluding all extra rules on the grammar. ANTLRInputStream input = new ANTLRInputStream(is); CerlLexer lexer = new CerlLexer(input); …
fvarj
  • 205
  • 1
  • 3
  • 9
2
votes
2 answers

which Oauth flow is good for Token authentication with javascript SPA

-I have a SPA application in javascipt -A webapi service .net -A token service in a same project .net Problem 1 Spa application make an ajax request to token endpoints using grant_type password. in return it gets back a token that is saved in…
harmeet
  • 137
  • 1
  • 9
1 2 3
99
100