JSON Web Tokens compliment a stateless REST API architecture with an encrypted token mechanism that allow for convenient, distributed, and high-performance authentication and authorization of requests sent by clients. There are three main components of a token-based authentication scheme:
- Client-side, captures login information and hides disallowed actions for a good UX
- Server-side, validates that every request is both authenticated and has the proper authorization
- Auth service, generates and validates encrypted tokens, independently verifies authentication and authorization status of user requests from a data store
A secure system presumes that data sent/received between the major components mentioned is encrypted ...