-
Is it possible or is there a recommended approach/sample to make a DurableHttpRequest against a custom OAuth 2 authenticated resource, rather than a Managed Service Indentity protected resource? Perhaps using a custom TokenSource or IDurableHttpMessageHandlerFactory? Which approach may work best with the DI/config of Durable Functions? In my case I want to use the same admin clientid/clientsecret combination using client credentials flow for all durable http requests in the app. Many thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
I think using a custom Making it available through DI should work. We generally advise against using DI objects in orchestrator functions since they're technically non-deterministic, but I think injecting an Feel free to submit a GitHub issue (or even better, a PR) if you think we should have a built-in |
Beta Was this translation helpful? Give feedback.
I think using a custom
ITokenSource
implementation is the right way to go about this. We don't have a sample for OAuth 2 specifically, but you can refer to our token source unit tests to get an idea of what it might take.Making it available through DI should work. We generally advise against using DI objects in orchestrator functions since they're technically non-deterministic, but I think injecting an
ITokenSource
implementation should be fine since it's used primarily in the context of a built-in activity function.Feel free to submit a GitHub issue (or even better, a PR) if you think we should have a built-in
ITokenSource
implementation for a client credentials-based flow. I think thi…