Skip to content

Document JTI claim generation - #2195

Open
sdelamo wants to merge 1 commit into
5.1.xfrom
paperclip/mng-228-jti-docs
Open

Document JTI claim generation#2195
sdelamo wants to merge 1 commit into
5.1.xfrom
paperclip/mng-228-jti-docs

Conversation

@sdelamo

@sdelamo sdelamo commented May 22, 2026

Copy link
Copy Markdown
Member

Summary

  • Document the current JtiGenerator extension point for JWT ID (jti) claim generation.
  • Add a compiled Java docs snippet showing a custom JtiGenerator bean.
  • Correct the touched ClaimsGenerator API link to the current package.

Verification

  • git diff --check -- src/main/docs/guide/authenticationStrategies/jwt/claimsGeneration.adoc test-suite/src/test/java/io/micronaut/docs/claimsjti/CustomJtiGenerator.java
  • ./gradlew :test-suite:compileTestJava publishGuide --no-daemon --no-parallel --rerun-tasks
  • Rendered HTML spot-check confirmed JtiGenerator, generateJtiClaim(), CustomJtiGenerator, jti, and the JwtIdGenerator migration note.

Release Metadata

  • Target branch: 5.1.x
  • Release target: 5.1.0
  • Micronaut organization project selected upstream: 5.1.0 Release (Throw an error if multiple annotations are used. #147), no ambiguity noted upstream.
  • Live project association status: not linked by this run; GitHub rejected addProjectV2ItemById because the active GITHUB_TOKEN lacks the required project scope.
  • Type label: type: docs

Reviewer Routing

  • Linked issue creator: sdelamo.
  • Reviewer request status: GitHub rejected requesting sdelamo with Review cannot be requested from pull request author.

PR Assets

None required; this is a text-only guide/snippet change and the rendered guide output was verified locally.

Closes #402


✨ This message was AI-generated using gpt-5

Copilot AI review requested due to automatic review settings May 22, 2026 10:22

Copilot AI left a comment

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.

Pull request overview

Documents the existing JWT ID (jti) claim generation extension point (JtiGenerator) in the JWT claims generation guide, including a compiled snippet that shows how to provide a custom generator bean.

Changes:

  • Update the ClaimsGenerator API reference to the current io.micronaut.security.token.claims package.
  • Add documentation explaining that JWTClaimsSetGenerator will populate the jti claim when a JtiGenerator bean is present, and include a code snippet.
  • Add a compiled Java snippet (CustomJtiGenerator) demonstrating a JtiGenerator implementation.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
test-suite/src/test/java/io/micronaut/docs/claimsjti/CustomJtiGenerator.java Adds a compiled docs snippet demonstrating a custom JtiGenerator bean.
src/main/docs/guide/authenticationStrategies/jwt/claimsGeneration.adoc Updates ClaimsGenerator link and documents JtiGenerator-based jti claim generation with snippet + migration note.

@sonarqubecloud

Copy link
Copy Markdown

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

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

Document JwtIdGenerator

2 participants