Skip to content

thedull/node-jwt-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-jwt-demo

To log in as admin

curl -X POST -H "Content-Type: application/json" -d '{"username":"user1", "password":"Passw0rdAdmin"}' 'http://localhost:3000/login'

To access the admin lounge

curl -X GET -H "Authorization: Bearer <jwt>" 'http://localhost:3000/admin'

Docker

docker build . -t thedull/node-jwt-demo  
docker run -p 3001:3000 -u "node" -v ~/Projects/node-jwt-demo:/usr/src/app -d --name "node-jwt-demo" --init  thedull/node-jwt-demo  

Based on

https://stackabuse.com/authentication-and-authorization-with-jwts-in-express-js/

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published