{"info":{"_postman_id":"317a6185-e24e-bad4-a8bb-d1fa7c22d963","name":"Auth0 NodeJS JWT Auth","description":"<html><head></head><body><p>This is a NodeJS API that supports username and password authentication with JWTs and has APIs that return Chuck Norris phrases. How awesome is that?</p>\n<p><a href=\"https://github.com/auth0-blog/nodejs-jwt-authentication-sample\">https://github.com/auth0-blog/nodejs-jwt-authentication-sample</a></p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"3232248","collectionId":"317a6185-e24e-bad4-a8bb-d1fa7c22d963","publishedId":"7LnAi4o","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2017-12-22T16:22:16.000Z"},"item":[{"name":"Create User","id":"ec2e7845-51b1-0903-a015-7948b7e53cc4","request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"username\": \"user\",\n\t\"password\": \"password\",\n\t\"extra\": \"tech\"\n}"},"url":"http://localhost:3001/users","description":"<p>The body must have <code>username</code>, <code>password</code> and <code>extra</code>. It returns <code>id_token</code> and <code>access_token</code> which are signed with the secret located at the <code>config.json</code> file. The <code>id_token</code> will contain the <code>username</code> and the <code>extra</code> information sent, while the <code>access_token</code> will contain the <code>audience</code>, <code>jti</code>, <code>issuer</code> and <code>scope</code>.</p>\n","urlObject":{"protocol":"http","port":"3001","path":["users"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"ec2e7845-51b1-0903-a015-7948b7e53cc4"},{"name":"Create Session","id":"4d8e29d0-363e-50f6-41e1-4b3784d53625","request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"username\": \"user\",\n\t\"password\": \"password\"\n}"},"url":"http://localhost:3001/sessions/create","description":"<p>The body must have <code>username</code> and <code>password</code>. It returns <code>id_token</code> and <code>access_token</code> are signed with the secret located at the <code>config.json</code> file. The <code>id_token</code> will contain the <code>username</code> and the <code>extra</code> information sent, while the <code>access_token</code> will contain the <code>audience</code>, <code>jti</code>, <code>issuer</code> and <code>scope</code>.</p>\n","urlObject":{"protocol":"http","port":"3001","path":["sessions","create"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"4d8e29d0-363e-50f6-41e1-4b3784d53625"},{"name":"Random Quote","id":"6338455b-8042-7dae-db4a-5b8ebb5e71ff","request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":""},"url":"http://localhost:3001/api/random-quote","description":"<p>It returns a String with a Random quote from Chuck Norris. It doesn't require authentication.</p>\n","urlObject":{"protocol":"http","port":"3001","path":["api","random-quote"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"6338455b-8042-7dae-db4a-5b8ebb5e71ff"},{"name":"Protected Random Quote","id":"303ad8d4-57e1-c739-7c57-1d27c3182dbc","request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Bearer {your.jwt.token}","description":"<p>Replace {your.jwt.token} with your JWT token.</p>\n"}],"body":{"mode":"raw","raw":"{\n\t\"username\": \"user\",\n\t\"password\": \"password\"\n}"},"url":"http://localhost:3001/api/protected/random-quote","description":"<p>It returns a String with a Random quote from Chuck Norris. It requires authentication. </p>\n<p>The JWT - <code>access_token</code> must be sent on the <code>Authorization</code> header as follows: <code>Authorization: Bearer {jwt}</code></p>\n","urlObject":{"protocol":"http","port":"3001","path":["api","protected","random-quote"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"303ad8d4-57e1-c739-7c57-1d27c3182dbc"}]}