JSON Web Tokens Claims (2024)

Link to this section

JSON Web Token claims (JWT Claims) are used to authenticate and authorize applications and APIs. JWT claims provide a secure way to share information between different parties and are made up of three elements: a header, payload, and a signature.

JWT claims can be categorized into two parts, registered claims, and custom claims, and provide a flexible, lightweight, and easily integrated way of authenticating and authorizing users.

JSON Web Token Claims Defined

Link to this section

JSON Web Tokens (JWTs) are an open industry standard used to share information between two parties: a client and a server. JWTs provide a secure way to authenticate users, authorize access, and share information. JWTs are made up of three parts: a header, a payload, and a signature.

  • Header: this is the first part of the code, which contains information about the type of token and the cryptographic algorithm used to sign it.
  • Payload: contains ‘claims’ about the user and other data that is deemed useful.
  • Signature: the signature is created by taking the encoded header, the encoded payload, a secret, and the algorithm named in the header. The signature of a JWT is employed to confirm that the code has not been tampered with or altered during transmission.

JWT claims are located in the payload section and provide essential information regarding the user and the context of the token. JWT claims can be divided into two categories: registered claims and custom claims.

Registered claims

Link to this section

Registered claims are a set of predetermined claims that aren’t required but are recommended to be used to deliver useful and interoperable claims. Examples of the most important registered claims include:

  • iss (issuer): Issuer of the JWT.
  • sub (subject): Subject of the JWT (the user).
  • aud (audience): The JWT intended recipient or audience.
  • exp (expiration time): The time the JWT expires.
  • nbf (not before policy): Identifies the time before which JWT can not be accepted into processing.
  • iat (issued at time): Identifies the time at which the JWT was issued. This can be used to establish the age of the JWT or the exact time the token was generated.
  • jti (JWT ID): Unique identifier; this can be used to prevent the JWT from being used more than once.

Custom claims

Link to this section

You can set and control your own custom claims and add them to a token using Actions. Custom claims are specific to a given application or use case and aren’t established by the JWT specification.

For example, you could add custom claims to a dashboard managing user accounts. In addition to the standard claims sub and iat you might want additional information about a user by adding custom claims called user_type which provides information about whether the user is an administrator or a regular user.

Public claims

Link to this section

Public claims are JWT claims that aren’t defined by the JWT specification and there are no predetermined names used for them. Instead, developers can create custom public claims that suit their specific needs.

Although public claims are not required, they are recommended to provide useful and interoperable claims and can be used by various parties if they agree on their meaning. If developers create public claims, they must be registered or use collision-resistant names. Public claims can be found in the IANA JSON Web Token Claims Registry.

Common public names used by developers include:

  • Name: the name of the user
  • Email: the email address of the particular user
  • Locale: the user’s preferred language

Private claims

Link to this section

Private claims are additional bits of information relating to your specific application or organization and much like public claims, they are not standardized by the JWT specification.

For example, a public claim may contain a user’s name and email, but private claims can provide more information about a user such as their department name, role in an organization, and permissions.

Since private claims are not standardized, they should not be used when sensitive information is involved or shared throughout various applications.

JWTs provide companies with a secure way of authenticating and authorizing users by offering a secure way to establish claims between two parties. JWT claims are typically divided into two categories. Registered claims provide predetermined information, whereas custom, private and public claims allow developers to set their own claims, whether that’s widely accepted definitions of public claims or private claims that are specific to the company.

See how Kinde compares to other authentication providers.

JSON Web Tokens Claims (2024)
Top Articles
Say More, Risk Less: What to Tell Your Financial Advisor
Can I Retire at 65 with $2.5 Million?
Hotels Near 6491 Peachtree Industrial Blvd
Duralast Gold Cv Axle
Edina Omni Portal
Notary Ups Hours
Vanadium Conan Exiles
Tv Schedule Today No Cable
Katie Boyle Dancer Biography
Vichatter Gifs
Hartland Liquidation Oconomowoc
Darksteel Plate Deepwoken
2024 U-Haul ® Truck Rental Review
Seattle Rpz
Best Suv In 2010
National Office Liquidators Llc
Uktulut Pier Ritual Site
Daylight Matt And Kim Lyrics
Cta Bus Tracker 77
Pickswise Review 2024: Is Pickswise a Trusted Tipster?
Kirksey's Mortuary - Birmingham - Alabama - Funeral Homes | Tribute Archive
Allybearloves
College Basketball Picks: NCAAB Picks Against The Spread | Pickswise
Coomeet Premium Mod Apk For Pc
Gina Wilson Angle Addition Postulate
How Taraswrld Leaks Exposed the Dark Side of TikTok Fame
Milwaukee Nickname Crossword Clue
Pioneer Library Overdrive
Harrison County Wv Arrests This Week
Movies - EPIC Theatres
Weather Underground Durham
Ewg Eucerin
Proto Ultima Exoplating
Hoofdletters voor God in de NBV21 - Bijbelblog
October 19 Sunset
Egg Crutch Glove Envelope
Kattis-Solutions
Kaiju Paradise Crafting Recipes
2015 Chevrolet Silverado 1500 for sale - Houston, TX - craigslist
Microsoftlicentiespecialist.nl - Microcenter - ICT voor het MKB
Top-ranked Wisconsin beats Marquette in front of record volleyball crowd at Fiserv Forum. What we learned.
Why Holly Gibney Is One of TV's Best Protagonists
Bcy Testing Solution Columbia Sc
Emily Browning Fansite
Valls family wants to build a hotel near Versailles Restaurant
Is Ameriprise A Pyramid Scheme
Breaking down the Stafford trade
2000 Fortnite Symbols
Tamilblasters.wu
Inside the Bestselling Medical Mystery 'Hidden Valley Road'
Varsity Competition Results 2022
Latest Posts
Article information

Author: Annamae Dooley

Last Updated:

Views: 5917

Rating: 4.4 / 5 (65 voted)

Reviews: 80% of readers found this page helpful

Author information

Name: Annamae Dooley

Birthday: 2001-07-26

Address: 9687 Tambra Meadow, Bradleyhaven, TN 53219

Phone: +9316045904039

Job: Future Coordinator

Hobby: Archery, Couponing, Poi, Kite flying, Knitting, Rappelling, Baseball

Introduction: My name is Annamae Dooley, I am a witty, quaint, lovely, clever, rich, sparkling, powerful person who loves writing and wants to share my knowledge and understanding with you.