<?php
 declare(strict_types=1); namespace Square; use Square\Http\HttpRequest; class BearerAuthManager implements AuthManagerInterface, BearerAuthCredentials { private $accessToken; public function __construct(string $accessToken) { $this->accessToken = $accessToken; } public function getAccessToken(): string { return $this->accessToken; } public function equals(string $accessToken): bool { return $accessToken == $this->accessToken; } public function apply(HttpRequest $httpRequest) { $httpRequest->addHeader('Authorization', 'Bearer ' . $this->accessToken); } } 