| Total Complexity | 5 |
| Total Lines | 35 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | final class QueryParamAuth implements AuthInterface |
||
| 13 | { |
||
| 14 | private const TOKEN_PARAM = 'access-token'; |
||
| 15 | /** |
||
| 16 | * @var string the parameter name for passing the access token |
||
| 17 | */ |
||
| 18 | private $tokenParam = self::TOKEN_PARAM; |
||
| 19 | /** |
||
| 20 | * @var IdentityRepositoryInterface |
||
| 21 | */ |
||
| 22 | private $identityRepository; |
||
| 23 | |||
| 24 | public function __construct(IdentityRepositoryInterface $identityRepository) |
||
| 25 | { |
||
| 26 | $this->identityRepository = $identityRepository; |
||
| 27 | } |
||
| 28 | |||
| 29 | public function authenticate(ServerRequestInterface $request): ?IdentityInterface |
||
| 37 | } |
||
| 38 | |||
| 39 | public function challenge(ResponseInterface $response): ResponseInterface |
||
| 42 | } |
||
| 43 | |||
| 44 | public function setTokenParam(string $param): void |
||
| 49 |