Skip to main content

require_actor

Function require_actor 

Source
pub(crate) async fn require_actor(
    state: &AppState,
    caller: Option<&Caller>,
    site: ActorSite,
    actor: Option<&str>,
) -> Result<(), String>
Expand description

check_actor that refuses: a request whose token names an agent may claim only that agent as its sender. Ok for an Unattributed caller (no token to compare with: the UI, muxsh, a peer srv), for a request that names no actor, and when the caller’s row can’t be read. The error is the handler’s answer.