| Total Complexity | 2 |
| Total Lines | 20 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | final class HttpBearer extends HttpHeader |
||
| 13 | { |
||
| 14 | private const HEADER_NAME = 'Authorization'; |
||
| 15 | private const PATTERN = '/^Bearer\s+(.*?)$/'; |
||
| 16 | |||
| 17 | protected string $headerName = self::HEADER_NAME; |
||
| 18 | protected string $pattern = self::PATTERN; |
||
| 19 | /** |
||
| 20 | * @var string the HTTP authentication realm |
||
| 21 | */ |
||
| 22 | private string $realm = 'api'; |
||
| 23 | |||
| 24 | 3 | public function challenge(ResponseInterface $response): ResponseInterface |
|
| 27 | } |
||
| 28 | |||
| 29 | 1 | public function setRealm(string $realm): void |
|
| 34 |