JSON list of questions that a user. Other ask that are answered by the following text:…
- User
JSON list of questions that a user. Other ask that are answered by the following text:
Through plugins, can support both authenticated users (with cookies) and authenticated API agents (via authentication tokens). The word "actor" is used to cover both of these cases. Every request to Datasette has an associated actor value, available in the code as request.actor . This can be None for unauthenticated requests, or a JSON compatible Python dictionary for authenticated users or API agents. The actor dictionary can be any shape - the design of that data structure is left up to the plugins. A useful convention is to include an "id" string, as demonstrated by the "root" actor below. Plugins can use the actor_from_request(datasette, request) hook to implement custom logic for authenticating an actor based on the incoming HTTP request.
- Assistant
"What is an 'actor' in the context of Datasette?"
"How does handle authenticated users and API agents?"
"What is the role of plugins in authenticating users?"
"What information does the 'request.actor' provide?"
"What could the value of 'request.actor' be in the case of unauthenticated requests?"
"What does the 'actor' dictionary look like for authenticated users or API agents?"
"What's the significance of the 'id' string in the 'actor' dictionary?"
"How can plugins create custom logic for authenticating an actor?"
"What is the function 'actor_from_request(datasette, request)' used for?"
"What is an 'actor' in the context of Datasette?"
"How does handle authenticated users and API agents?"
"What is the role of plugins in authenticating users?"
"What information does the 'request.actor' provide?"
"What could the value of 'request.actor' be in the case of unauthenticated requests?"
"What does the 'actor' dictionary look like for authenticated users or API agents?"
"What's the significance of the 'id' string in the 'actor' dictionary?"