Skip to content

DRAFT: Added /learning-identity section to docs, plus JWT page - #1161

Draft
ProgrammerAL wants to merge 7 commits into
mainfrom
alrodri/learning-jwt
Draft

DRAFT: Added /learning-identity section to docs, plus JWT page#1161
ProgrammerAL wants to merge 7 commits into
mainfrom
alrodri/learning-jwt

Conversation

@ProgrammerAL

Copy link
Copy Markdown
Contributor

Added new /learning-identity and /learning-identity/what-is-a-jwt pages to the docs based on previous conversations. This PR is meant for discussion to decide if we want to continue adding this type of learning content like this to documentation site or not.

@ProgrammerAL ProgrammerAL self-assigned this Jul 27, 2026
@ProgrammerAL ProgrammerAL added documentation Improvements or additions to documentation enhancement New feature or request labels Jul 27, 2026

The structure of a JWT follows the JSON Web Signature (JWS) format defined in [RFC7515](https://datatracker.ietf.org/doc/html/rfc7515). This means they are formatted into three sections separated by a dot. Each section is defined below, but they are all self-contained, Base64 URL Encoded strings.

> Reminder: Encoded does not mean encrypted. Anyone can decode a JWT and read the plaintext values. The JWT is Base64 URL Encoded to make it simple to transmit the string between services by avoiding characters that can be problematic on the web, like spaces and quotes.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Astro/Starlight has a way to make this a "note", please see other pages for examples.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will update this. I copy/pasted that from somewhere. I think we need to change a few places to match the correct way.

Comment thread astro/src/content/docs/learning-identity/what-is-a-jwt.mdx Outdated

## Sections of a JWT

The three sections of the JWT are Base64 URL Encoded strings separated by a dot. They are the Header, Payload, and Signature.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The three sections of the JWT are Base64 URL Encoded strings separated by a dot. They are the Header, Payload, and Signature.
The three sections of the JWT are Base64 URL-encoded strings separated by a dot. They are the **Header**, **Payload**, and **Signature**.

Comment thread astro/src/content/docs/learning-identity/what-is-a-jwt.mdx Outdated
- `iat`: The date/time the JWT was issued. The value is the number of seconds since January 1, 1970.
- `exp`: The date/time the JWT expires. Systems receiving a JWT should not trust one after its expiration time has passed. The value is the number of seconds since January 1, 1970.

The full set of Registered Claim Names are listed in the [JWT RFC](https://datatracker.ietf.org/doc/html/rfc7519#section-4.1).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The full set of Registered Claim Names are listed in the [JWT RFC](https://datatracker.ietf.org/doc/html/rfc7519#section-4.1).
The full set of Registered Claim Names is listed in the [JWT RFC](https://datatracker.ietf.org/doc/html/rfc7519#section-4.1).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@khalidabuhakmeh Are you sure the suggested change is correct pronunciation? If you are, I'll change it. Just sounds weird to me.


Custom Claims are any claims that are specific to your application(s). For example, you can define the `department` claim to be a string that specifies which department the user works for. The actual value is stored in a database and loaded when the user signs in.

> Note: An identity system can add any number of claims. Some systems will add everything it knows about the subject, others will scope them only to the system that will use the JWT.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be turned into a call out component

}
```

> Note: A JWT may contain every claim for a user, making the transmitted string very large. Conversely it can contain a minimum amount of information about the subject. The amount of information contained in the JWT is determined by the service generating it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

again, call out component.

Comment thread astro/src/content/docs/learning-identity/what-is-a-jwt.mdx Outdated
@@ -0,0 +1,27 @@
---

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file feels incomplete, is this all there is?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it was just a starter to show other things we can add in the future.

@khalidabuhakmeh

khalidabuhakmeh commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Since this is a discussion PR, I think it would make more sense to have a general /learn group and then have different topics underneath. For example, /learn/identity, and then we could expand based on structure rather than URL.

ProgrammerAL and others added 3 commits July 28, 2026 13:00
Co-authored-by: Khalid Abuhakmeh <khalid.abuhakmeh@duendesoftware.com>
Co-authored-by: Khalid Abuhakmeh <khalid.abuhakmeh@duendesoftware.com>
Co-authored-by: Khalid Abuhakmeh <khalid.abuhakmeh@duendesoftware.com>

@maartenba maartenba left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not commenting on content at this point. For sake of the discussion, let's agree we want a "learning/big picture" section in the docs. With that in mind:

  • What would ba a table of contents for such section/multi-part tutorial?
  • Does existing big picture content from the docs need to go in (or be updated)?

@ProgrammerAL I think a next step would be inventorizing and ToC building here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants