Header authentication service configuration
soullivaneuh opened this issue · 2 comments
soullivaneuh commented
Description
The Header authentication service, introduced in php-http/message@144d13b, is present since v1.9.0 of its related package.
However, it is currently not possible to configure it through the bundle configuration:
HttplugBundle/src/DependencyInjection/Configuration.php
Lines 645 to 666 in 57284fb
Example
httplug:
clients:
sample:
# ...
plugins:
- base_uri:
uri: "%env(SAMPLE_API_URL)%"
- authentication:
header:
type: header
name: "ApiKey"
token: "%env(SAMPLE_API_TOKEN)%"dbu commented
yeah, that is missing. the place in the configuration you linked is where we should add it indeed.
and update the documentation here and here
for your proposed configuration format, i would make it consistent with the name in the authentication class, so it would be
- authentication:
header:
type: header
name: "ApiKey"
value: "%env(SAMPLE_API_TOKEN)%"
do you want to do a pull request for it?
soullivaneuh commented
Working on it.