Vikas Rajput Profile picture
May 15 9 tweets 3 min read Twitter logo Read on Twitter
JWT is now become the de-facto standard for authenticating Modern APIs.

This guide will make it dead simple for you to understand JWT:
1. JWT stands for JSON Web Token
2. It's a token that is used to authenticate and authorize users in an application.

"authenticate" means who they're.
"authorize" means what they can access.

The token itself contains, all the necessary information about the user, like user ID and role, etc, in a JSON.
3. JWT tokens are typically generated by the server and sent to the client after a successful login.

The client can then use the JWT token (with each request) to authenticate and authorize itself to the server.

Typically the token looks like this: Image
4. JWT has three parts:

a) Header (highlighted in red below)
b) Payload (highlighted in pink below)
c) Signature (highlighted in blue below)

On left you can see the encoded token, on right we can see decoded JSON object with 3 parts. Image
The header typically consists of two parts: the type of the token, which is usually JWT, and the signing algorithm being used, such as HMAC SHA256 or RSA. Image
The payload contains the claims, which are statements about an entity (typically, the user) and additional metadata.

Claims are typically represented as key-value pairs and can include information such as the user's ID, name, email, and roles. Image
The signature is used to verify that the sender of the JWT is who it says it is and to ensure that the message has not been tampered with. Image
That's a quick introduction to JWT!

Follow me @vikasrajputin for more.

If you find this thread helpful then Like/Retweet the first tweet below:

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Vikas Rajput

Vikas Rajput Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @vikasrajputin

Mar 10
Beginner Guide to Views in SQL: 🧵👇
1. Definition

- View contains a subset of records from a table based on given conditions

- Consider View as a Virtual table with restricted data, it is not a physical table
2. Usecases

- Consider a situation where we don't want to give full access to the base table

- In such case, we can create a view which can have limited rows and columns from the base table

- Later, View can be used as a table in all DQL statements
Read 5 tweets
Feb 8
Beginner Guide to Views in SQL: 🧵👇
1. Definition

- View contains a subset of records from a table based on given conditions

- Consider View as a Virtual table with restricted data, it is not a physical table
2. Usecases

- Consider a situation where we don't want to give full access to the base table

- In such case, we can create a view which can have limited rows and columns from the base table

- Later, View can be used as a table in all DQL statements
Read 10 tweets
Feb 6
You can either pay > 1000 USD to a bootcamp to learn Java

or You can learn it for free from Youtube!!

Here's a List of 4 Top Quality Resources to Master Java:
Read 6 tweets
Feb 3
OOP Concepts are the Fundamentals of Programming Languages like Java, Python (and many others)

Here's a Dead Simple Guide to Understand It:
There are six different concepts in OOP:

1. Object
2. Class
3. Inheritance
4. Encapsulation
5. Abstraction
6. Polymorphism

Note: In this thread, we'll try to understand it from Java's standpoint.
1. Object

Every real-world entity is an object.

An object has Behaviour (things it does or performs) and Attributes (things that describe it).

For eg: A Chair object can have behaviour like Movement, Height Adjustment & Attributes like Color, Make & Model, and Price.
Read 10 tweets
Feb 1
6 Online SQL IDEs to Practice SQL:
1. SQL Fiddle

🔗 http: // sqlfiddle. com/
2. Programiz

🔗 https: //www. programiz. com/sql/online-compiler/
Read 8 tweets
Jan 30
SQL: What are DDL, DML, DQL, DCL and TCL? 🧵👇
1. Introduction

The SQL commands are categorized into the following categories:

DDL - Data Definition Language
DML - Data Manipulation Language
DQL - Data Query Language
DCL - Data Control Language
TCL - Transaction Control Language

Let's see each of them in detail.
2. DDL

Queries like - CREATE, DROP, TRUNCATE, and ALTER fall into this category because they all manage the structure of DB Objects in some way.

For eg: CREATE command creates the structure of a table, DROP command removes the table structure.
Read 8 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(