scorelab / Tracker

Tracker project first for trains
Apache License 2.0
30 stars 79 forks source link

Token generated using JWT for authentication. Passport authentication using local strategy #37

Open pupudu opened 8 years ago

pupudu commented 8 years ago

This is regarding issue #2
@agentmilindu
@rhperera

To test the JWT token generation route, please send a POST request to /authenticate with the following body.

{
   username: "dodan",
   password: 1
}

To test the passport authentication, send a request POST /login with a payload in following pattern

{
   username: "dodan",
   password: 1
}

To test the create user route, send a request, POST /signup with a payload in following pattern

{
   name: "Pubudu",
   username: "dodan",
   password: 1
}
pupudu commented 8 years ago

Note - Password hashing is done using bcrypt-nodejs module