- Work done to allow more flexibility on based on whatever custom attributes were provided.

This commit is contained in:
Dave Mc Nicoll committed 2023-11-13 14:21:39 -05:00
1 parent b3e792e20f
commit bea01badb7
5 files changed
+21 -8

No files matched your search

+2 -2
View File
@@ -29,7 +29,7 @@ class Rest implements AdapterInterface
public function connect(): object
{
return new CurlClient($this->headers, $this->options, ( new CurlAuthorization())->fromAuthenticationEnum($this->auth, $this->username ?? false, $this->password ?? false, $this->token ?? false) );
return new CurlClient($this->headers, $this->options, ( new CurlAuthorization() )->fromAuthenticationEnum($this->auth, $this->username ?? false, $this->password ?? false, $this->token ?? false) );
}
public function buildDataSourceName(): string
@@ -39,7 +39,7 @@ class Rest implements AdapterInterface
public function setup(array $configuration): void
{
$this->auth = AuthenticationEnum::from($configuration['auth'] ?: AuthenticationEnum::Basic->value);
$this->auth = AuthenticationEnum::from($configuration['auth'] ?? AuthenticationEnum::Basic->value);
$this->url = rtrim($configuration['url'], '/');
foreach([ 'username', 'password', 'token', 'headers', 'options' ] as $conf) {