Total Complexity | 2 |
Total Lines | 20 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | final class HttpBearer extends HttpHeader |
||
16 | { |
||
17 | protected string $headerName = Header::AUTHORIZATION; |
||
18 | protected string $pattern = '/^Bearer\s+(.*?)$/'; |
||
19 | private string $realm = 'api'; |
||
20 | |||
21 | 3 | public function challenge(ResponseInterface $response): ResponseInterface |
|
24 | } |
||
25 | |||
26 | /** |
||
27 | * @param string $realm The HTTP authentication realm. |
||
28 | * @return self |
||
29 | */ |
||
30 | 2 | public function withRealm(string $realm): self |
|
37 |