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

How to get jwt token from controller (user already logged in)

So I'm using Lexik JWT bundle (Symfony 2.8) to authenticate over Google and when user is logging in it works well. My Success handler looks like this: public function onAuthenticationSuccess(Request $request, TokenInterface $token) { $user =…
MilanG
  • 6,994
  • 2
  • 35
  • 64
2
votes
1 answer

Creating auth token for non user object django rest framework

I am looking to generate a django authtoken for a non user object. previously I had easily generated auth tokens for user objects like this email = request.data.get('email') user = User.objects.get(email=email) Token.objects.create(user=user) but…
Rishabh Pandey
  • 209
  • 1
  • 4
  • 16
2
votes
1 answer

parameterized warning silencing macro trouble

The following doesn't compile: #define SUPPRESS(w) _Pragma("GCC diagnostic ignored " ## w) SUPPRESS("-Wuseless-cast") int main() { int a = (int)4; return a; } Here's the error: error: pasting ""GCC diagnostic ignored "" and…
onqtam
  • 4,356
  • 2
  • 28
  • 50
2
votes
2 answers

Run AJAX Request After JWT Refresh

I have an existing single page application that I have transitioned to JWT instead of PHP sessions. Its working well but I am trying to figure out how to refresh the JWT (if necessary) BEFORE AJAX requests. A little background: Upon user login I…
bwlange3
  • 41
  • 3
  • 10
2
votes
2 answers

When storing term vectors is the parameter "store" mandatory?

I want to store term vectors of a field but I have doubt in my mind. In the documentation they say: "mappings": { "tweet": { "properties": { "text": { "type": "text", "term_vector":…
mel
  • 2,730
  • 8
  • 35
  • 70
2
votes
1 answer

Impersonating users to access hives - various methods, what are the practical issues?

I am designing a Service to run under LocalSystem account on Win2000, XP and Vista. It will need access to users registry hives, sometimes for extended periods of time, both when the users are logged-in, and also, when they are not logged-in (IF the…
Will5801
2
votes
1 answer

How to read tokens from a file one by one in Python?

The problem I am experiencing is that in my code, I am not able to get individual words/tokens to match with the stop words to remove from the original text. Instead, I am getting a whole sentence and hence am not able to match it with the stop…
user3778289
  • 323
  • 4
  • 18
2
votes
1 answer

How to model resource level permissions in JWT OAuth2 tokens?

What is the canonical way to encode resource level permissions into a JWT access_token? Or in other words, how do you best encode access to other people's resources? Is it something like this: { scopes: { me: ['user', 'repo'], // My user …
papercowboy
  • 3,369
  • 2
  • 28
  • 32
2
votes
1 answer

IAIK session between 2 java processes

We have 2 Java processes each using IAIK (iaik.pkcs.pkcs11)to talk to a shared single token NSS/HSM/smartcard. Each of these Java processes creates the IAIK session and logs in: session = token.openSession(Token.SessionType.SERIAL_SESSION, …
CryptoNewbie
2
votes
1 answer

How can I save Login Token in outlook Addin

Im programming an C# Outlook Addin. This Addin should pass some information from an E-mail Item to a Webservice. After im logged in on to the Webservice i get some LoginTokens. My question is where can i save this Login informations, so that I…
themelder
  • 21
  • 1
2
votes
1 answer

Auth0 JWT Access Tokens

I am having difficulty getting Auth0 to return access tokens in JWT format. I need them in JWT format in order that I can verify them using a Java JWT library. I am using Auth0 lock to login, and use /oauth/token to get the access token - I have…
user3352488
  • 281
  • 3
  • 15
2
votes
1 answer

Parameters needed to generate SAS Token for Azure IoT Hub in C#

I have this method from Microsoft documentation: https://learn.microsoft.com/en-us/rest/api/eventhub/generate-sas-token private static string createToken(string resourceUri, string keyName, string key) { TimeSpan sinceEpoch = DateTime.UtcNow - new…
Adela Toderici
  • 1,118
  • 13
  • 30
2
votes
1 answer

What is the common way to maintain accessibility in ASP.NET MVC?

I'm developing a pure web api backend using ASP.NET MVC to support my android application, I'm just wondering that which way to maintain accessibility of user would you like to recommend me? In my application, there is a sign in/ sign up…
2
votes
3 answers

What is the right way to resolve token mismatch error in laravel?

since I've updated laravel to 5.4 I constantly get: TokenMismatchException in VerifyCsrfToken.php line 68 exception thrown. After some digging and reading through a whole lot of posts and github issues I've figured that my tokens aren't matching…
orustammanapov
  • 1,792
  • 5
  • 25
  • 44
2
votes
1 answer

escaping(\') single quotes in a regex which takes string between two single quotes.

I have the following string: std::string s("server ('m1.labs.teradata.com') username ('use\\')r_*5') password('u\" er 5') dbname ('default')"); I have used the following code: int main() { std::regex…
user6511542
  • 59
  • 1
  • 7