oscerd opened a new pull request, #27779: URL: https://github.com/apache/camel/pull/27779
## Backport of #26681 Cherry-pick of #26681 onto `camel-4.22.x`. **Original PR:** #26681 - CAMEL-24872: camel-oauth: Align token caching with effective profile configuration **Original author:** @oscerd **Target branch:** `camel-4.22.x` The code applies without changes. `OAuthClientCredentialsTokenResolver` on `camel-4.22.x` was identical to the `main` version that #26681 changed. The resolver and its new test are now byte-identical to `main`, and the component doc and its catalog copy get the same paragraph. The upgrade-guide note is left out, as the guides live on `main`; the 4.22.2 note belongs in main's `camel-4x-upgrade-guide-4_22.adoc`. Tested on the branch: - the camel-oauth unit tests: 152 tests, 0 failures, 7 environment-dependent tests skipped (as on `main`), including the 12 cases of `OAuthClientCredentialsTokenResolverTest`; - a full reactor build without tests. ### Original description # Description Align OAuth client credentials token-cache identity with the effective token request configuration. Equivalent configurations continue to reuse tokens across resolver instances, while differences in credentials or requested scope produce separate entries. Omitted scopes retain equivalent behavior, and disabling caching still requests a fresh token. Adds 12 regression cases, updates the component documentation and generated catalog copy, and documents the behavior change in the 4.23 upgrade guide. Validation: the OAuth module and its 96 prerequisites built successfully. OAuth module tests passed: 129 passed, including all 12 new cases; 7 environment-dependent tests were skipped. Maven formatting/import sorting and `git diff --check` passed. The full 692-module reactor build (`mvn -Dquickly install`) completed successfully across the initial run and a resumed run after switching Maven Central hostname to recover from a DNS failure at `camel-shiro`. This reactor build skipped test execution; OAuth tests were run separately as noted above. # Target - [x] Targets `main` (Camel 4). # Tracking - [x] Tracked by [CAMEL-24872](https://issues.apache.org/jira/browse/CAMEL-24872). # Apache Camel coding standards and style - [x] The commit has a meaningful subject and description. - [x] Root build and generated-file validation completed; see validation above. # AI-assisted contributions - [x] The commit includes AI co-authorship attribution. AI-generated by Codex on behalf of @oscerd. Generated by Codex via OSS Helper. _Claude Code on behalf of oscerd_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
