Croway opened a new pull request, #30178: URL: https://github.com/apache/camel/pull/30178
JIRA: [CAMEL-27017](https://issues.apache.org/jira/browse/CAMEL-27017) - The endpoint read only `authUsername`/`authPassword`; `authMethod=Bearer` with `authBearerToken` registered nothing, so a `WWW-Authenticate: Bearer` challenge got no answer (401). `HttpComponent.configureBasicAuthentication` now registers the token, scoped to the endpoint host like the Basic credentials (CAMEL-24452). - With `authenticationPreemptive=true`, `PreemptiveAuthExecChainHandler` cached a new `BearerScheme` without its token: `BasicAuthCache` keeps a scheme's state only once its challenge is complete, so every request failed in the client with `IllegalStateException: Bearer token is null` (also with the token on the component). The handler now completes the scheme and gives it the token before caching it. - `authMethod=NTLM` selected NTLM only when `authDomain` was set, and the component's `httpConfiguration` ignored `authMethod=NTLM`. `DefaultAuthenticationHttpClientConfigurer` takes an explicit NTLM flag. - Docs: an "Authentication" section in `http-component.adoc` (Basic, Bearer, NTLM, preemptive, redirects), and the `authenticationPreemptive` description no longer says Basic only. Tests: `HttpBearerAndNtlmAuthenticationTest` (13 tests): 7 fail on main and pass with the fix. The controls (component Bearer on challenge, `Authorization` header, Basic challenge and preemptive, NTLM with domain, no token to a redirect target on another host) pass on both. The other auth, OAuth2 and proxy tests of camel-http pass. Upgrade guide: entry in `camel-4x-upgrade-guide-4_24.adoc` (the endpoint Bearer options are applied; `authMethod=NTLM` uses NTLM without `authDomain`). _Claude Code on behalf of Federico Mariani_ -- 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]
