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("/") datasette.set_actor_cookie(response, {"id": "cleopaws"}) The shape of data encoded in the cookie is as follows: { "a": { "id": "cleopaws" } } To implement logout in a plugin, use the delete_actor_cookie() method: response = Response.redirect("/") datasette.delete_actor_cookie(response) | ["Authentication and permissions"] | [] |