[ 
https://issues.apache.org/jira/browse/CAMEL-27752?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Work on CAMEL-27752 started by Guillaume Nodet.
-----------------------------------------------
> camel-docling, camel-huggingface: oauthProfile token resolved once at 
> startup, should be per-request
> ----------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-27752
>                 URL: https://issues.apache.org/jira/browse/CAMEL-27752
>             Project: Camel
>          Issue Type: Bug
>            Reporter: Guillaume Nodet
>            Assignee: Guillaume Nodet
>            Priority: Major
>             Fix For: 4.25.0
>
>
> The {{oauthProfile}} option in {{camel-docling}} and {{camel-huggingface}} 
> still resolves the OAuth token once
> at startup (in {{doStart()}}), and stores the string in the configuration. 
> After the token expires, all requests fail with HTTP 401
> until the route is restarted.
> CAMEL-27125 fixed the same problem in {{camel-openai}}, 
> {{camel-langchain4j-agent}}, and {{camel-spring-ai-chat}} by switching to
> per-request supplier lambdas. The same approach should be applied to these 
> two components:
> * {{DoclingProducer.resolveOAuthToken()}} (called from {{doStart()}}) — move 
> to a per-request supplier
> * {{HuggingFaceProducer.resolveOAuthToken()}} (called from {{doStart()}}) — 
> move to a per-request supplier
> Noted in CAMEL-27125 review as a deferred follow-up: camel-ibm-watsonx-ai and 
> camel-ibm-watsonx-data were handled by
> CAMEL-27570 and CAMEL-27575 respectively.
> See: https://github.com/apache/camel/pull/30707



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to