sections: authentication:authentication-ds-actor

This data as json

id page ref title content breadcrumbs references
authentication:authentication-ds-actor authentication authentication-ds-actor The ds_actor cookie Datasette includes a default authentication plugin which looks for a signed ds_actor cookie containing a JSON actor dictionary. This is how the root actor mechanism works. Authentication plugins can set signed ds_actor cookies themselves like so: response = Response.redirect("/") response.set_cookie("ds_actor", datasette.sign({ "a": { "id": "cleopaws" } }, "actor")) Note that you need to pass "actor" as the namespace to .sign(value, namespace="default") . The shape of data encoded in the cookie is as follows: { "a": {... actor ...} } ["Authentication and permissions"] []