JWT Validation

This lesson discusses JSON web token validation.

In this lesson, we will look at how JWTs can be used as an authentication and authorization mechanism. As mentioned in the previous lesson, we will be discussing signed JWTs.

Here is the basic flow of JWT authentication:

  1. The client sends a request to the server with user credentials.
  2. The server generates a signed JWT for the client if the credentials are valid.
  3. The server sends the token back to the client which is stored in the browser.
  4. For every subsequent request, the client sends the token back to the server.
  5. The server validates the token, and if it is valid then grants access to the client.

Get hands-on with 1200+ tech skills courses.