Skip to content

AlexKVal/rest-json-api-jwt-auth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

User's roles

  • user - can only read Accounts
  • admin - can do all REST operations with Accounts

Routes for auth

  • GET /api/users - to choose user_id
  • POST /api/auth - to authenticate and get JWT

Protected routes

/api/accounts:

  • GET - get all the accounts
  • POST - create an account

/api/accounts/:account_id:

  • GET - get a single account
  • PUT - update an account with new data
  • DELETE - delete an account

About

an example of RESTful json api with JSON-Web-Token authentication

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published