private function generateCallback($request, $token)
    {
        if (! array_key_exists('callback', $request->REQUEST)) {
            return null;
        }
        $calback = $request->REQUEST['callback'];

        $user = $token->get_user();
        $calback = str_replace("{{token}}", $token->token, $calback);
        $calback = str_replace("{{host}}", Pluf_Tenant::current()->domain, $calback);
        $calback = str_replace("{{userId}}", $user->id, $calback);
        $calback = str_replace("{{userLogin}}", $user->login, $calback);
        return $calback;
    }