Jose Haro Peralta Profile picture
{ author: Microservice APIs @ManningBooks (https://t.co/oMQNuE5el2) } { editor: https://t.co/p5eOIYz3cF } { founder: https://t.co/k3Gyo4JfTo } { Instructor, consultant }
Mar 27, 2022 โ€ข 7 tweets โ€ข 2 min read
๐Ÿ’ก๐–๐ก๐š๐ญ ๐š๐ซ๐ž ๐‰๐–๐“๐ฌ?๐Ÿ’ก

If you work with APIs, you've probably come across JWTs. JWT stands for ๐‰๐’๐Ž๐ ๐–๐ž๐› ๐“๐จ๐ค๐ž๐ง, and it's a JSON document that contains information about a user. We call the properties of a JWT claims.

๐Ÿงต๐Ÿงต๐Ÿงต๐Ÿงต
1/

#API #jwt #auth #WebSecurity There're two types of JWTs:

๐Ÿ‘‰ ๐ˆ๐ƒ ๐ญ๐จ๐ค๐ž๐ง๐ฌ are tokens carrying user-identifying data like their name and email. You should ๐๐„๐•๐„๐‘ use an ID token to validate access to an API.

๐Ÿ‘‰ ๐€๐œ๐œ๐ž๐ฌ๐ฌ ๐ญ๐จ๐ค๐ž๐ง๐ฌ are tokens with claims about the right to access an API.

2/