hetzner-dns-api/generated/Authentication/AuthAPITokenAuthentication.php

21 lines
598 B
PHP
Raw Normal View History

2023-01-05 12:55:52 +01:00
<?php
namespace DigiComp\HetznerDnsApi\Authentication;
class AuthAPITokenAuthentication implements \Jane\Component\OpenApiRuntime\Client\AuthenticationPlugin
{
private $apiKey;
public function __construct(string $apiKey)
{
$this->{'apiKey'} = $apiKey;
}
public function authentication(\Psr\Http\Message\RequestInterface $request) : \Psr\Http\Message\RequestInterface
{
$request = $request->withHeader('Auth-API-Token', $this->{'apiKey'});
return $request;
}
public function getScope() : string
{
return 'Auth-API-Token';
}
}