| Conditions | 1 |
| Paths | 1 |
| Total Lines | 7 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | public function authenticate(AuthBackend $backend, string $credentials): ?object |
||
| 18 | { |
||
| 19 | return $backend($this->getTokenPrefix(), $this->extractCredentials($credentials)) |
||
| 20 | ?? throw new HTTPUnauthorized( |
||
| 21 | title: __('Authorization failed'), |
||
| 22 | detail: __('Invalid authorization token'), |
||
| 23 | type: 'https://kodedphp.github.io/auth/value', |
||
| 24 | ); |
||
| 32 |