pub enum ForgeAgent {
Pod {
webid: String,
username: String,
},
Nostr {
pubkey_hex: String,
},
Anonymous,
}Expand description
The resolved caller identity, produced by the server’s WAC/auth layer
or by crate::auth. Mirrors the design’s ForgeAgent.
Variants§
Pod
A pod-backed agent. owner = username; author id = the WebID.
Fields
Nostr
A podless nostr agent identified by a 64-hex x-only pubkey.
Anonymous
No credential resolved.
Implementations§
Source§impl ForgeAgent
impl ForgeAgent
Sourcepub fn owner(&self) -> Option<&str>
pub fn owner(&self) -> Option<&str>
The namespace this agent owns (its first-path-segment identity),
or None when anonymous.
The stable author id recorded in spine entries and thread
pointers: a WebID for pod agents, did:nostr:<hex> for nostr
agents, "anonymous" otherwise.
Sourcepub fn is_nostr(&self) -> bool
pub fn is_nostr(&self) -> bool
true for a podless nostr agent (bodies live in forge-hosted
storage rather than a pod).
Sourcepub fn can_write_namespace(&self, owner_segment: &str) -> bool
pub fn can_write_namespace(&self, owner_segment: &str) -> bool
May this agent write (create/push/comment) into the namespace
owned by owner_segment? True only when the agent’s own owner id
matches the target namespace exactly. Anonymous always fails.
Trait Implementations§
Source§impl Clone for ForgeAgent
impl Clone for ForgeAgent
Source§fn clone(&self) -> ForgeAgent
fn clone(&self) -> ForgeAgent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more