protected function checkUsername()
    {
        $token = $this->tokenStorage->getToken();
        if (!$token instanceof RememberMeToken && !$token instanceof UsernamePasswordToken) {
            throw new ServerErrorException([
                'error_description' => 'The authorization server encountered an unexpected condition that prevented it from fulfilling the request.',
            ]);
        }

        return $token->getUsername();
    }