let benjamin = { age: 26, city: 'Versailles', company: 'Companeo', dev: ['Javascript', 'AngularJs', 'Node.js', 'C#', 'Unity3D'], devSince: '2012-08-01' }
Github / LinkedIn / Twitter
Identification by Login/password
Create session on server
Store session cookie on browser
Send back cookie to server with every request
Identification by Login(/password)
Store JWT on browser
Send back JWT to server with every request
JWS
Available keys:
cty (mandatory if nested JWT or JWE)
Available keys (link):
with JWS
Never store JWT inside Db
Don't store sensitive data in signed JWT
Store JWT with HTML5 solutions (localStorage/sessionStorage)
Send JWT inside your headers request
Use short token expiration date
Use issuer claim to identify your token
Avoid nested JWT ( JWE inside a JWT ) #KISS
with a JWS
Store the jti inside your dB and remove it when you want to block access to your app
It will keep track of your created tokens
CLICK !
By ben080989
Introduction to json web token specs and how to use it