fix(config-api): user birthday not displayed when fetched #12799 by pujavs · Pull Request #12803 · JanssenProject/jans (original) (raw)

📝 Walkthrough

Walkthrough

This pull request adds comprehensive transaction token (tx_token) support to the API configuration schema and fixes a bug where user birthday attributes are not returned in GET requests by modifying birthdate attribute parsing logic in the user management service.

Changes

Cohort / File(s) Summary
API Configuration Update jans-config-api/docs/jans-config-api-swagger.yaml Extended OpenAPI/Swagger configuration to support transaction tokens across multiple sections. Added tx_token to response types, token types, and OAuth client configurations. Introduced new Client schema properties: txTokenLifetime, txTokenSignedResponseAlg, txTokenEncryptedResponseAlg, txTokenEncryptedResponseEnc. Extended TokenEntity, Scope, CustomScope, and UmaResource schemas with transaction token attributes. Added feature flags and configuration options for transaction token handling, including signing/encryption algorithms and lifetime controls throughout ApiAppConfiguration.
User Management Bug Fix jans-config-api/plugins/user-mgt-plugin/src/main/java/io/jans/configapi/plugin/mgt/rest/UserResource.java, jans-config-api/plugins/user-mgt-plugin/src/main/java/io/jans/configapi/plugin/mgt/service/UserMgmtService.java Removed per-user birthdate normalization during search results in UserResource. Modified UserMgmtService.parseBirthDateAttribute() to guard against null values and improve error handling. Enhanced logging in removeInActiveCustomAttribute() with intermediate variable for detailed attribute data logging. These changes enable proper birthdate attribute retrieval in GET requests.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings, 1 inconclusive)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The PR includes significant out-of-scope changes: extensive Swagger YAML modifications for transaction token support (tx_token) and various schema enhancements are unrelated to fixing the birthday display issue. Remove transaction token and other unrelated changes from this PR. Create a separate PR for the tx_token feature additions to maintain clear scope and review focus.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Description check ❓ Inconclusive The PR description includes the required sections (Target issue, Implementation Details) and correctly references issue #12799. However, all testing and documentation checklist items remain unchecked, indicating incomplete verification. Complete the pre-submission checklist by confirming static analysis has been run, tests have been added/updated, and documentation impact has been assessed.

✅ Passed checks (2 passed)

Check name Status Explanation
Title check ✅ Passed The title clearly and accurately summarizes the main change: fixing the issue where user birthday is not displayed when fetched, referencing the specific issue #12799.
Linked Issues check ✅ Passed The PR addresses the core requirement in #12799 by fixing the date parsing logic that prevented birthday from being returned in GET requests, aligning with the expected behavior.

✨ Finishing touches


📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f045fba and 677a44b.

📒 Files selected for processing (3)

Learnt from: yuriyz
Repo: JanssenProject/jans PR: 12596
File: docs/janssen-server/auth-server/tokens/oauth-tx-tokens.md:146-257
Timestamp: 2025-11-19T12:55:01.596Z
Learning: In the Janssen project, the TxToken custom script documentation is intentionally duplicated in both `docs/janssen-server/auth-server/tokens/oauth-tx-tokens.md` and `docs/script-catalog/tx_token/txtoken.md` to provide easy access from both the transaction token documentation and the script catalog.

Applied to files:

jans-config-api/docs/jans-config-api-swagger.yaml (2)

4796-4802: ⚠️ Critical mismatch: PR objectives and code do not align.

The PR objectives state the fix removes date parsing code that was throwing errors when handling user birthdays (issue #12799). However, the file provided contains only OpenAPI schema additions for tx_token support, with no birthday-related changes or user management service modifications.

Either:

  1. The wrong file was provided for review, or
  2. The PR description does not accurately reflect the code changes, or
  3. Additional files containing the actual birthday parsing fix are missing from this review.

Please confirm that all files implementing the birthday bug fix are included in this PR review.

Also applies to: 17057-17063


14949-14968: Clarify the scope and context of property additions.

Hunk 2 adds eight boolean properties (selected, whitePagesCanView, adminCanAccess, userCanEdit, adminCanEdit, userCanAccess, userCanView, adminCanView) to what appears to be an attribute schema.

Without schema context (parent object name, purpose), it's unclear whether:

  • These properties relate to the tx_token feature or an unrelated feature
  • They represent access control for a specific entity (user, ldap configuration, etc.)
  • They are part of the PR objectives

Please provide context for these additions or clarify their relationship to the birthday bug fix stated in the PR objectives.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.