docs: improve Javadocs for OAuth2, OIDC, and JWT#23734
Closed
netroms wants to merge 4 commits into
Closed
Conversation
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
…e-oauth2-oidc-javadocs
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
|
david-mackessy
approved these changes
Apr 24, 2026
Contributor
david-mackessy
left a comment
There was a problem hiding this comment.
I'm approving on the basis that you've read all of these and are happy with them 😀
This was referenced Apr 24, 2026
Contributor
Author
|
Splitting into three smaller PRs per reviewer feedback:
Each is Javadoc-only against |
Contributor
Author
|
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



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