Skip to content

docs: improve Javadocs for OAuth2, OIDC, and JWT#23734

Closed
netroms wants to merge 4 commits into
masterfrom
docs/improve-oauth2-oidc-javadocs
Closed

docs: improve Javadocs for OAuth2, OIDC, and JWT#23734
netroms wants to merge 4 commits into
masterfrom
docs/improve-oauth2-oidc-javadocs

Conversation

@netroms
Copy link
Copy Markdown
Contributor

@netroms netroms commented Apr 24, 2026

Summary

Aligns Javadocs across the OAuth2 / OIDC / JWT code with the user-facing reference rewrite in dhis2-docs PR #1739. 39 classes covered: authorization-server core, registered-client + authorization + consent persistence, DCR, OIDC relying-party, OIDC provider builders, and JWT bearer resource-server auth.

AI Assisted

netroms added 4 commits April 24, 2026 01:50
Align class, method, and field Javadocs across the OAuth2
authorization-server, OIDC relying-party, JWT bearer, and dynamic
client-registration code with the user-facing OAuth2 / OIDC / JWT
reference in the DHIS2 docs.

Covers DHIS2's two roles (authorization server vs relying party), DCR
and IAT semantics, private_key_jwt client authentication (including
inline-JWKS decoding for the Android Capture app), the internal DHIS2
OIDC provider (registration id dhis2-internal), and the resource-server
JWT bearer validation flow.

No behavior, signatures, imports, or annotations were changed.

AI Assisted
Addresses one accuracy issue and two wording nits from the review of
the previous commit:

- OAuth2DynamicClientRegistrationController: drop the incorrect claim
  that remote jwks_uri is rejected on DCR. Explain instead that inline
  jwks is the norm because the main DCR client (the Android Capture
  app) cannot host a public jwks_uri, and the inline form is decoded at
  token-endpoint time by InlineJwksJwtClientAssertionDecoderFactory.
- Dhis2OAuth2ClientService.findByClientId: drop the "keep this fast"
  imperative; keep only the factual note about Spring Authorization
  Server calling it per token-endpoint authentication.
- DhisJwtAuthenticationToken: clarify that the wrapped DhisOidcUser
  uses IdTokenClaimNames.SUB as its name attribute because the mapping
  claim has already been consumed upstream by the resolver.

AI Assisted
Mark authorship on the OAuth2, OIDC, and JWT classes that were still
missing an @author tag. Also drops the class-level Javadoc on
Dhis2OAuth2Authorization, Dhis2OAuth2AuthorizationConsent,
OAuth2AuthorizationController, and OAuth2AuthorizationConsentController
where a concurrent pending PR owns the class-level description; only
the @author tag remains on those four.

AI Assisted
@sonarqubecloud
Copy link
Copy Markdown

@netroms netroms marked this pull request as draft April 24, 2026 08:13
@netroms netroms marked this pull request as ready for review April 24, 2026 09:25
Copy link
Copy Markdown
Contributor

@david-mackessy david-mackessy left a comment

Choose a reason for hiding this comment

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

I'm approving on the basis that you've read all of these and are happy with them 😀

@netroms
Copy link
Copy Markdown
Contributor Author

netroms commented Apr 24, 2026

Splitting into three smaller PRs per reviewer feedback:

Each is Javadoc-only against master and carries a subset of the 39 files from this PR.

@netroms netroms closed this Apr 24, 2026
@netroms
Copy link
Copy Markdown
Contributor Author

netroms commented Apr 24, 2026

This PR has been split into three smaller PRs, each focused on one area of the OAuth2 / OIDC / JWT stack:

Each branch was created fresh off master, so every PR shows only the Javadoc delta for its own scope, no cross-contamination. Reviewers can merge them independently in any order. Please continue the review over there.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants