How to use jwt in springboot
java spring-boot jwt
- what is jwt
- jwt (json token token), s a standard that is mostly used for securing REST APIs.
- how to sign a toke
- JWTs can be signed using a secret (with the HMAC algorithm) or a public/private key pair using RSA or ECDSA.
- the structure of jwt
- jwt token is componented by the following three parts (always like xxx.xxx.xxx)
- header, tell the service the type of the token and the encoding algorithm
1
2
3
4{
"alg": "HS256",
"typ": "JWT"
} - payload
- different claim
- Registered claims: issuer, expiration time, subject
- Public claims: name
- Private claims:
- different claim
- signature
- to encode the header, payload and secret
- header, tell the service the type of the token and the encoding algorithm
- jwt token is componented by the following three parts (always like xxx.xxx.xxx)
- why we use jwt
- authentication
- authorization
- how to use jwt token
- the framework of jwt usage
- code implementation
- the framework of jwt usage
- Title: How to use jwt in springboot
- Author: Xiao Qiang
- Created at : 2023-03-05 14:24:03
- Updated at : 2025-03-08 10:49:30
- Link: http://fdslk.github.io/tech/java/spring-boot/jwt/2023/03/05/integration-jwt/
- License: This work is licensed under CC BY-NC-SA 4.0.
Comments