Angular 6 tutorial by

Followed Part 1 of the Angular 6 tutorial here
https://github.com/techiediaries/angular-express-jwt

Documenting the Postman settings here as they were not covered in the tutorial

Get the secret access token


no settings needed in Authorization tab

No settings needed in Headers tab

Pass the email and password in the Body tab

Results after I hit the "Send" button.



Using the secret access token to submit a new record



Authorization tab- no settings required

Headers tab - need to add in the Authorization key and  set  value as "Bearer <access token>"

Body tab pass in the new record as json

Successfully added the record


And some settings for ease of copy-and-paste


http://localhost:3000/auth/login

{"id":2,"username":"Gertrude25","password":"ytoC9PpKFDiJiBf","email":"Molly.Barrows@hotmail.com"}


access token
Bearer <accesstoken>

http://localhost:3000/contacts

{
  "id": "201",
  "firstName": "Ahmed",
  "lastName": "Bouchefra",
  "email": "ahmed@bouchefra.com",
  "phone": "913.037.3475 x26585",
  "city": "Agadir",
  "country": "Morocco",
  "title": "Developer"
}

Comments

Popular posts from this blog

How to create an organizational chart in your webpage using Google Organization Chart Tools

Embed JSX code with if condition in React app