Skip to content

Latest commit

 

History

History
22 lines (15 loc) · 1.08 KB

LocalAuthentication.md

File metadata and controls

22 lines (15 loc) · 1.08 KB

Local Authentication with Json Web Token

Json Web Token is a modern alternative to HTTP cookie for authentication purposes.

node-jsonwebtoken is the node library which implements such a protocol.

A sequence diagram a worth a thousand words:

Json Web Token Sequence Diagram

Please change the following configuration according to your need, especially the secret.

For a list of all available options, please consult the node-jsonwebtoken documentation

"jwt": {
  "secret": "I love shrimp with mayonnaise",
  "options": {
    "expiresIn": "15 days"
  }
}