Custom authentication schemes and the follow_redirects parameter #3527
Unanswered
whilenot-dev
asked this question in
Potential Issue
Replies: 1 comment 2 replies
-
|
I have the same issue now with no real great workaround. I'm working on some custom auths, that uses other auths also. And they use redirects. The issue is if I force follow_redirects on, then I can't intercept the redirects, but if I don't do it, then there is no good way to do the redirects myself when needed. This also touches the fact that we don't have access to build_request from inside the auth module I would love if we somehow could yield a RequestTmpl or something like that, that would hold the values to build_request and the follow_redirects. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Version
0.28.1Goal
I'm currently writing my own authentication scheme by subclassing the
Authclass as mentioned in the docs. The requests in my authentication scheme sometimes need to follow redirects, but sometimes don't. I'd like to keep the default client behavior of following redirects, but would like to configure it on a "per-request"-basis in myAuth-subclass.Potential issue
The
follow_redirectssetting is only available as parameter in the client instance and its corresponding methods to initiate a request (get,post,sendetc.). Both these things are currently hidden from (A) theauth_flow-method when subclassing theAuthclass, or from (B) a callable that accepts a request and returns an authenticated request instance.Question
How is it currently possible to configure the
follow_redirectsparameter within a custom authentication scheme?Beta Was this translation helpful? Give feedback.
All reactions