Member-only story
JWT:- Json Web Token, What it is , Why is it required and When to use.
4 min readFeb 5, 2020
JWT a.k.a Json Web Token is a standard used for authorization.
As per jwt.io definition of JWT
What is JSON Web Token?
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. This information can be verified and trusted because it is digitally signed. JWTs can be signed using a secret (with the HMAC algorithm) or a public/private key pair using RSA or ECDSA.
Benefits of JSON Web Tokens
- Stateless/Self-Contained: JSON Web Tokens contain all the information necessary to within the token itself to maintain state.
- Cross-domain/CORS: Since JWTs contain all the information necessary in the token itself they can easily be passed around between domains and between servers.
- Secure: Since the JWT is passed in the authorization header with every request and validated by the server Cross-Site Request Forgery is prevented
- Multi-Platform/Multi-Language Support: JWTs are fully supported in .NET, Python, Node.js, Java, Javascript, PHP, Perl, Ruby, Elixir, Go, Haskell, Rust, Lua, Scala, D, Closure, Swift, C and Delphi.
A Typical Flow for JWT Token