public function authenticate(ApiKeyRepository $apiKey) { if (!$this->auth->byId($apiKey->user_id)) { return false; } return $this->getUser(); }