vignesh-manel opened a new pull request, #28697:
URL: https://github.com/apache/camel/pull/28697

   # Description
   
   Backport of #28691 to `camel-4.22.x`, as suggested by @Croway.
   
   Clean cherry-pick (`-x`) of 04a1f0d29f1d, no conflicts. The changed lines 
are identical to the commit on `main` (diffed). `AuthClientForIntegration.java` 
on `camel-4.22.x` was identical to `main` before the fix.
   
   Fixes [CAMEL-26162](https://issues.apache.org/jira/browse/CAMEL-26162):
   
   - **Basic header:** the token request sent `Basic [89, 50, ...]` 
(`Arrays.toString` of the Base64 bytes) instead of the Base64 text, so no 
access token could be obtained. This broke in the HttpComponents 5 upgrade 
(CAMEL-18995).
   - **Token parsing:** the access token was cut from the response at fixed 
offsets. It is now read as the `access_token` field of the JSON response with 
`camel-util-json`.
   
   No upgrade-guide entry (none on `main` either): obtaining a token did not 
work before.
   
   Local: `mvn clean install -Psourcecheck` in `components/camel-workday` on 
this branch: 13 tests (3 new in `AuthClientForIntegrationTest`), 0 failures; no 
generated files changed.
   
   _Claude Code on behalf of vignesh-manel_
   
   # Target
   
   - [x] I checked that the commit is targeting the correct branch (Camel 4 
uses the `main` branch). This is a backport to `camel-4.22.x`.
   
   # Tracking
   - [x] If this is a large change, bug fix, or code improvement, I checked 
there is a [JIRA issue](https://issues.apache.org/jira/browse/CAMEL) filed for 
the change (usually before you start working on it).
   
   # Apache Camel coding standards and style
   
   - [x] I checked that each commit in the pull request has a meaningful 
subject line and body.
   
   - [x] I have run `mvn clean install -DskipTests` locally from root folder 
and I have committed all auto-generated changes. (Run in the module with 
`-Psourcecheck`, after building its dependencies with `-am -Dquickly`; no 
generated files changed.)
   
   # AI-assisted contributions
   
   - [x] If this PR includes AI-generated code, commits have proper 
co-authorship attribution (e.g., `Co-authored-by` trailers) and the PR 
description identifies the AI tool used.
   
   🤖 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]

Reply via email to