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. -JWT
쉽게 말해 JWT는 인증에 필요한 정보들을 암호화한 JSON 토큰이다.
JWT는 세 파트로 나누어진다.
aaaaaa.bbbbbb.cccccc
JWT는 위와 같은 형식으로 표현되고 각각 header.Payload.Signature 로 구성된다.
header에는 JWT에서 사용하는 타입과 알고리즘 종류가 담겨있다.
Payload에는 사용자 권한 정보가 담겨있다.
Signature에는 전자서명이 담겨있다.