davsclaus opened a new pull request, #30369:
URL: https://github.com/apache/camel/pull/30369

   [CAMEL-27226](https://issues.apache.org/jira/browse/CAMEL-27226), follow-up 
to CAMEL-27220 (google-sheets, #30364)
   
   ## What changed
   - New `GoogleApiRequestHelper` in camel-google-common. It sets the options 
and headers on the request built by the Google API client, except the 
credential options: `clientId`, `clientSecret`, `accessToken`, `refreshToken`, 
`serviceAccountKey` and `delegate`.
   - The producers and consumers of google-drive, google-mail and 
google-calendar use it.
     - **drive and mail:** the access token is no longer the `access_token` 
query parameter of the request URL. The OAuth credential of the client sends it 
in the `Authorization` header, as before.
     - **calendar requests** have no such parameter, and the consumers only 
pass the method options, so for them the change only aligns the code.
   - google-sheets can switch to the shared helper once #30364 is merged.
   
   ## Upgrade note
   One entry in the 4.24 upgrade guide: a `CamelGoogleDrive.accessToken` or 
`CamelGoogleMail.accessToken` header is no longer put on the request.
   
   ## Tests
   - New `GoogleDriveRequestCredentialTest`, `GoogleMailRequestCredentialTest` 
and `GoogleCalendarRequestCredentialTest` run an OAuth client on a recording 
`MockHttpTransport`. For the producer and the consumer, they check that the 
request URL has no `access_token` and that the `Authorization` header is 
`Bearer <token>`.
     - The drive and mail producer tests fail without the change.
     - The others are regression guards.
   - New `GoogleApiRequestHelperTest` in camel-google-common.
   - The unit tests of camel-google-common, -drive, -mail and -calendar pass.
   
   _Claude Code on behalf of Claus Ibsen_
   
   🤖 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