Skip to content
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

Make Authentication middleware transition easier #1405

Open
2 tasks
iMacTia opened this issue Mar 1, 2022 · 2 comments
Open
2 tasks

Make Authentication middleware transition easier #1405

iMacTia opened this issue Mar 1, 2022 · 2 comments

Comments

@iMacTia
Copy link
Member

iMacTia commented Mar 1, 2022

Issue description

As discussed in #1358 (comment), it is currently not a straightforward process to support both Faraday v1 and v2 ways of adding authentication to a request.

CHECKLIST (delete before creating the issue)

  • Make the authorization middleware work the same as v2 also in v1, while maintaining backwards compatibility
  • Update documentation to explain what is possible in v1 and what will be available in v2
@ariana-paris
Copy link

While the documentation is being updated, can I put in a vote for an example of token authorization?

I understood the bit about changing my conn.authorization to conn.request :authorization, but then is it 'Token'? Is it :token? Do I still need the token: XYZ I have in my v1 code or is it just 'XYZ'? Is there a way to link to a complete list of the options rather than guessing based on the HTTP spec? I'd normally experiment but I'm still on v1.x so nothing works anyway, so just thought that would preempt the same questions when my future self has to use 2.x... Thanks! 😀

@iMacTia
Copy link
Member Author

iMacTia commented Mar 7, 2022

That's a fair point @ariana-paris, the documentation currently assumes a certain level of understanding of the code internals in order to achieve the desired result. This should also be addressed in scope of this ticket 👍. A few examples covering the most common HTTP Authentication mechanisms would be extremely useful.
Thanks for raising this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants