Make FunctionAuth part of the public API #1674
Unanswered
fsenart
asked this question in
Potential Issue
Replies: 2 comments 1 reply
-
It was a deliberate choice, since you don't need to use the class for the simple function case, you can just pass the function itself. Eg... def custom_auth(request):
request["X-Auth-Token"] = "1234"
httpx.get("https://www.example.com", auth=custom_auth) We could nonetheless expose the class, but as things currently stand it's an implementation detail, that users don't need to know about. |
Beta Was this translation helpful? Give feedback.
1 reply
-
Just for the record: This class is quite useful when implementing a sequential combination of auths as prepared in |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It is surely an oversight, but the handy
auth.FunctionAuth
class is not exported.Beta Was this translation helpful? Give feedback.
All reactions