-
Notifications
You must be signed in to change notification settings - Fork 50
Closed
Description
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
switch ($config['type']) { | |
case 'basic': | |
$this->validateAuthenticationType(['username', 'password'], $config, 'basic'); | |
break; | |
case 'bearer': | |
$this->validateAuthenticationType(['token'], $config, 'bearer'); | |
break; | |
case 'service': | |
$this->validateAuthenticationType(['service'], $config, 'service'); | |
break; | |
case 'wsse': | |
$this->validateAuthenticationType(['username', 'password'], $config, 'wsse'); | |
break; | |
case 'query_param': | |
$this->validateAuthenticationType(['params'], $config, 'query_param'); | |
break; | |
} |
Example
httplug:
clients:
sample:
# ...
plugins:
- base_uri:
uri: "%env(SAMPLE_API_URL)%"
- authentication:
header:
type: header
name: "ApiKey"
token: "%env(SAMPLE_API_TOKEN)%"
Metadata
Metadata
Assignees
Labels
No labels