Merge pull request #101 from ProfiCloS/feature/api-token

feature/api-token
This commit is contained in:
Junade
2020-02-03 17:22:40 +00:00
committed by GitHub
2 changed files with 46 additions and 0 deletions

25
src/Auth/APIToken.php Normal file
View File

@@ -0,0 +1,25 @@
<?php
/**
* User: czPechy
* Date: 30/07/2018
* Time: 22:42
*/
namespace Cloudflare\API\Auth;
class APIToken implements Auth
{
private $apiToken;
public function __construct(string $apiToken)
{
$this->apiToken = $apiToken;
}
public function getHeaders(): array
{
return [
'Authorization' => 'Bearer ' . $this->apiToken
];
}
}