DRAFT: Added /learning-identity section to docs, plus JWT page - #1161
DRAFT: Added /learning-identity section to docs, plus JWT page#1161ProgrammerAL wants to merge 7 commits into
Conversation
|
|
||
| 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. |
There was a problem hiding this comment.
Astro/Starlight has a way to make this a "note", please see other pages for examples.
There was a problem hiding this comment.
Will update this. I copy/pasted that from somewhere. I think we need to change a few places to match the correct way.
|
|
||
| ## 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. |
There was a problem hiding this comment.
| 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**. |
| - `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). |
There was a problem hiding this comment.
| 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). |
There was a problem hiding this comment.
@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. |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
again, call out component.
| @@ -0,0 +1,27 @@ | |||
| --- | |||
There was a problem hiding this comment.
This file feels incomplete, is this all there is?
There was a problem hiding this comment.
Yeah, it was just a starter to show other things we can add in the future.
|
Since this is a discussion PR, I think it would make more sense to have a general |
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
left a comment
There was a problem hiding this comment.
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.
Added new
/learning-identityand/learning-identity/what-is-a-jwtpages 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.