def process_resource(self, req: falcon.Request, resp: falcon.Response, _resource, _params): if is_public(req.path, self.public_paths): logging.debug( "This is a public resource which does not need a valid token") return token = auth_token(req) if not token: raise falcon.HTTPSeeOther(self.login_path) resp.auth_user = self._backend.user_info(auth_token=token)