GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - MrQuery/smallTokenHandler: simple JavaScript JWT Token Handler and cross domain data handling with cookie

BranchesTags
Open more actions menu

Latest commit

 

History

5 Commits
5 Commits

Folders and files

NameName
Last commit message
Last commit date
LICENSE
LICENSE
 
 
README.md
README.md
 
 
tokenHandler.js
tokenHandler.js
 
 

Repository files navigation

smallTokenHandler

simple JavaScript JWT Token Handler and cross domain data handling with cookie

getFromStorage:
returns token value from cookie or Null

checkToken:
token valid? returns true/false

getSet:
gets token from request header saves value to cookie returns token value

getCookie:
searches token name in cookies returns value

decode:
splits token decodes payload data returns data as json-obj

validate:
get timestamp get exp date from token check both returns true/false

deleteToken:
deletes cookie from storage


-- USAGE: --

refresh token within request success/error: => TH.decode(TH.getSet(RESPONSE_VAR_WITH_HEADER_INFORMATION));

Check Token (checkToken()) before calling http-request, if true returns, send the token from storage with the request-header.

header information for request header: => headers: {'Authorization' : TH.getFromStorage()}

About

simple JavaScript JWT Token Handler and cross domain data handling with cookie

Resources

Readme
GPL-3.0 license
Activity

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.