pub struct SignedRequest<P> {
pub agent_id: AgentId,
pub payload: P,
pub signature: String,
pub timestamp: i64,
}Expand description
A signed REST body: an operation’s payload (or input) and the signature envelope, as one flat object.
{"agent_id": …, <the payload's fields>, "signature": …, "timestamp": …}.
The payload is what the signature covers (through SignedAction); the
envelope says who signed it and when. Unknown fields are refused and
named. Every signed write, and the signed reads that take parameters,
use this one type, so the server, the client and the published schema
agree on the body by construction.
Fields§
§agent_id: AgentIdThe acting agent; its registered key must have made signature
payload: PThe operation’s own fields
signature: StringHex-encoded Ed25519 signature over the action’s canonical bytes
(SignedAction) and timestamp
timestamp: i64Unix timestamp included in the signature digest
Trait Implementations§
Source§impl<P: Clone> Clone for SignedRequest<P>
impl<P: Clone> Clone for SignedRequest<P>
Source§impl<P: Debug> Debug for SignedRequest<P>
impl<P: Debug> Debug for SignedRequest<P>
Source§impl<'de, P: DeserializeOwned> Deserialize<'de> for SignedRequest<P>
impl<'de, P: DeserializeOwned> Deserialize<'de> for SignedRequest<P>
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<P> Freeze for SignedRequest<P>where
P: Freeze,
impl<P> RefUnwindSafe for SignedRequest<P>where
P: RefUnwindSafe,
impl<P> Send for SignedRequest<P>where
P: Send,
impl<P> Sync for SignedRequest<P>where
P: Sync,
impl<P> Unpin for SignedRequest<P>where
P: Unpin,
impl<P> UnsafeUnpin for SignedRequest<P>where
P: UnsafeUnpin,
impl<P> UnwindSafe for SignedRequest<P>where
P: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more