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

Angular 4 OAuth Security Localstorage

i'm getting started with angular 4. Now i try an authentication with oauth. If the credentials are right, the server sends the token to the client. Now i save it to the localstorage: localStorage.setItem('currentUser', data.access_token); The…
HansPeter
  • 319
  • 1
  • 4
  • 12
2
votes
1 answer

WS Security and UsernameToken node

I read https://www.oasis-open.org/committees/download.php/13392/wss-v1.1-spec-pr-UsernameTokenProfile-01.htm and I know how to generate the Nonce and the Password. I have a doubt about UsernameToken wsu:Id. What should be value of wsu:Id…
Jarmark
  • 131
  • 2
  • 11
2
votes
1 answer

Ruby Code to verify AAD token in correct

I have a scenario of calling Rubi API which is AAD authenticated I have the code to generate AAD token from Client ID and Secret. But need to code to verify the token is correct or not when it reaches the Ruby API.
Umair Akbar
  • 578
  • 5
  • 11
2
votes
0 answers

Login issue with Laravel 5.2 (TokenMismatchException in compiled.php line 3227)

After login with right credentials script redirects to /admin, then back to login page. If I remove login route in $except variable in Middleware/VerifyCrsftoken.php, then I'm getting this error: TokenMismatchException in compiled.php line 3227. On…
zm_fans
  • 101
  • 4
2
votes
1 answer

How to match "mut" in a Rust macro?

I would like to pass mutability to a macro so that I can do mymacro![mut foo]; mymacro![bar]; and the macro will see them as different matches. which specifier to use?
Yi Zhang
  • 31
  • 4
2
votes
2 answers

How do I implement long-term single sign-on with Firebase and a custom server?

I have a server-side rendered app that also communicates with Firebase. When a user logs in, the client gets an ID Token from firebase that I then share with my server as described in the documentation. My server stores the ID Token in a cookie, so…
django09
  • 235
  • 3
  • 15
2
votes
1 answer

Angular2 Routing, Routing parameters

I've got question some issues with routing parametres on angular2, params are undefined, i will show some code of this project: it's route.module import { NgModule } from '@angular/core'; import {RouterModule, Routes} from…
Jędrek Markowski
  • 444
  • 3
  • 6
  • 25
2
votes
0 answers

How to use JWT for laravel API for different user tables?

These are the basic functions of the driver user. public function authenticate(Request $request){ $credentials=$request->only('email','password'); try { \Config::set('auth.providers.users.model',…
Fercho Jerez
  • 141
  • 1
  • 5
2
votes
1 answer

avoid empty token in cpp

I have a string: s = "server ('m1.labs.terada')ta.com') username ('user5') password('user)5') dbname ('default')"; I am extracting the argument names: such as server, username..., dbname. To do this I am using the following regex: regex…
hydra123
  • 337
  • 5
  • 14
2
votes
2 answers

In C++, is it possible to use a string literal as a macro name?

Here's my scenario: I have a set of source files that I'd prefer to not modify, but I'd like to replace some of the string literals with other values. Here's an example: #define "oldString" "newString"
Freerobots
  • 772
  • 1
  • 6
  • 20
2
votes
1 answer

Create JWTAuth token in Factory Laravel

I have model User and need create db seeder with faker lib, but i have record _token using JWT. Now how to create _token with JWT? $factory->define(App\User::class, function (Faker\Generator $faker) { static $password; return [ …
Nguyen Manh Linh
  • 689
  • 1
  • 6
  • 7
2
votes
3 answers

Logout from Spotify with the sdk spotify-android-auth

I have an Android app, which the user can link to Spotify, with : AuthenticationClient.openLoginActivity(getActivity(), SPOTIFY_REQUEST_CODE, request); The problem is that I want the user to change his Spotify account so I want to logout the user…
mctregouet
  • 23
  • 4
2
votes
1 answer

CSRF token is visible in source code

Should my Cross-site request forgery TOKEN be viewable on my web page source code I am running a rails app in production and can see Cross-site request forgery token. I guess it should NOT be viewable.
Vis
  • 91
  • 1
  • 4
2
votes
1 answer

Tokens or token types missing name property

I am having issues in tokens: Sometimes they stop working and are not available for use. When I browse the tokens only these are available. After I check the status report, I can see the following message. Tokens start working automatically,…
Mohit Wadhwa
  • 321
  • 1
  • 2
  • 12
2
votes
4 answers

Django DRF Token Authentication

I'm having issues with DRF's token based authentication. Following is my landing page code (after login): @api_view(['GET','POST'],) def landing(request): this_tenant=request.user.tenant end=date_first.date.today() …
Sayantan
  • 315
  • 5
  • 20