| Total Complexity | 2 |
| Total Lines | 20 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | final class HttpBearerAuth extends HttpHeaderAuth |
||
| 10 | { |
||
| 11 | private const HEADER_NAME = 'Authorization'; |
||
| 12 | private const PATTERN = '/^Bearer\s+(.*?)$/'; |
||
| 13 | |||
| 14 | protected $headerName = self::HEADER_NAME; |
||
| 15 | protected $pattern = self::PATTERN; |
||
| 16 | /** |
||
| 17 | * @var string the HTTP authentication realm |
||
| 18 | */ |
||
| 19 | private $realm = 'api'; |
||
| 20 | |||
| 21 | public function challenge(ResponseInterface $response): ResponseInterface |
||
| 24 | } |
||
| 25 | |||
| 26 | public function setRealm(string $realm): void |
||
| 31 |