-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Support dynamically updating authentication headers #6954
Conversation
…ch send WIP: needs further test updates
…at request object has headers always defined But, it would need to be called manually...
…to feature/dynamic-auth-headers
class Auth: | ||
"""Authorization handler base class""" | ||
|
||
async def __call__(self, request) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
__call__()
is for normal callables, it'd be weird for it to be async. There's an __await__()
that exists for awaitables. Maybe don't go for magic methods? It looks like you're reinventing a protocol pattern.
Also, it feels like for the use-case you described using an async generator interface could be a better fit then an async function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…h/aiohttp into feature/dynamic-auth-headers
[Work in progress]
Initial basic refactor of
BasicAuth
object, generalized as an async callable/coroutine.What do these changes do?
TODO
Are there changes in behavior for the user?
TODO
Related issue number
#6915
Checklist
CONTRIBUTORS.txt
CHANGES
folder<issue_id>.<type>
for example (588.bugfix)issue_id
change it to the pr id after creating the pr.feature
: Signifying a new feature..bugfix
: Signifying a bug fix..doc
: Signifying a documentation improvement..removal
: Signifying a deprecation or removal of public API..misc
: A ticket has been closed, but it is not of interest to users.