Skip to content

Public Auth API - #732

Merged
lovelydinosaur merged 5 commits into
masterfrom
public-auth-api
Jan 7, 2020
Merged

lovelydinosaur merged 5 commits into
masterfrom
public-auth-api

Conversation

@lovelydinosaur

@lovelydinosaur lovelydinosaur commented Jan 7, 2020 •

Copy link
Copy Markdown
Member

Refs #731

Starting this PR with the proposed documentation. Implementation will require:

  • Switching the auth method name to .auth_flow.
  • Implementing a Request.aread() method and Request.content property.
  • Implementing .requires_request_body functionality on auth flows.
  • Expose httpx.Auth as public API.
  • Drop AuthFlow in favor of explicit type, in order to help guide users away from importing bits of httpx that are outside public API.

@lovelydinosaur lovelydinosaur added the docs Changes to the documentation label Jan 7, 2020
@lovelydinosaur lovelydinosaur mentioned this pull request Jan 7, 2020
@florimondmanca

Copy link
Copy Markdown
Contributor

Cc'ing @lepture relative to authlib/authlib#178 (comment) — from the docs proposed here, would this fit the use case for authlib?

@lovelydinosaur lovelydinosaur added this to the 0.11.0 milestone Jan 7, 2020
@lovelydinosaur lovelydinosaur mentioned this pull request Jan 7, 2020
8 of 10 tasks
@lovelydinosaur lovelydinosaur added enhancement New feature or request and removed docs Changes to the documentation labels Jan 7, 2020

@florimondmanca florimondmanca left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes for me! Just a small nit. I'm really happy with how the auth API turned out. 😄

Comment thread tests/models/test_requests.py Outdated
Co-Authored-By: Florimond Manca <florimond.manca@gmail.com>
@lovelydinosaur

Copy link
Copy Markdown
Member Author

I'm really happy with how the auth API turned out

I think you made a great call on the generator approach. 👍

It's also kinda nice that we've got a callable[request] -> request available for the simple cases, and a more powerful custom class + .auth_flow for multi-request flows.

@lepture

lepture commented Jan 7, 2020

Copy link
Copy Markdown

yes, that would work.

@lovelydinosaur
lovelydinosaur merged commit 12dd157 into master Jan 7, 2020
@lovelydinosaur
lovelydinosaur deleted the public-auth-api branch January 7, 2020 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Development

Successfully merging this pull request may close these issues.

3 participants