protected function isTokenValid($tokenString)
    {
        try {
            $user = ApiToken::validateToken($tokenString);

            // We need to make the login provider understand that we're now authenticated.
            $this->logUserIn($user);
        } catch (TokenInvalidException $er) {
            throw new ForceResponseException(new TokenAuthorisationRequiredResponse($this));
        }

        return true;
    }