Skip to content
Wei edited this page Apr 2, 2019 · 1 revision

In the context of an HTTP transaction, basic access authentication is a method for an HTTP user agent (e.g. a web browser) to provide a user name and password when making a request. In basic HTTP authentication, a request contains a header field of the form Authorization: Basic , where credentials is the base64 encoding of id and password joined by a colon.

JSON Web Token (JWT) is an open standard (RFC 7519) that defines a compact and self-contained way for securely transmitting information between parties as a JSON object.

  • Authorization: This is the most common scenario for using JWT. Once the user is logged in, each subsequent request will include the JWT, allowing the user to access routes, services, and resources that are permitted with that token.
  • In its compact form, JSON Web Tokens consist of three parts separated by dots (.), which are:
  1. Header
  2. Payload
  3. Signature

Good Solution: bcrypt(password)

  • there are a set of hash functions that were specifically designed for passwords. In addition to being secure "one-way" hash functions, they were also designed to be slow.

Clone this wiki locally