Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[HttpClient] Add new bearer option#30547
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
nicolas-grekas commentedMar 13, 2019 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I thought about it, but do we really need it, when the alternative is that one? Yes, it's shorter, but adding the option means added burden when implementing the interface. |
dunglas commentedMar 13, 2019 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Using a Bearer token is very common when requesting an API (more common than Basic). Also, it can be error prone (for instance, your example is wrong because the |
dunglas commentedMar 13, 2019
Regarding the burden, as this trait isn't internal, it should not be a big deal. |
fabpot commentedMar 14, 2019
Thank you@dunglas. |
This PR was squashed before being merged into the 4.3-dev branch (closes#30547).Discussion----------[HttpClient] Add new bearer option| Q | A| ------------- | ---| Branch? | master| Bug fix? | no| New feature? | yes<!-- don't forget to update src/**/CHANGELOG.md files -->| BC breaks? | no <!-- seehttps://symfony.com/bc -->| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->| Tests pass? | yes <!-- please add some, will be required by reviewers -->| Fixed tickets | n/a <!-- #-prefixed issue number(s), if any -->| License | MIT| Doc PR | n/aAdd a new "auth_bearer" option to set the corresponding flavor of the `Authorization` header as defined in RFC 6750 and used in OAuth (and others).Also rename "auth" to "auth_basic" for consistency as discussed with@nicolas-grekas.Commits-------f79ef21 [HttpClient] Add new bearer option
Uh oh!
There was an error while loading.Please reload this page.
Add a new "auth_bearer" option to set the corresponding flavor of the
Authorizationheader as defined in RFC 6750 and used in OAuth (and others).Also rename "auth" to "auth_basic" for consistency as discussed with@nicolas-grekas.