pub struct Payload {
pub purpose: String,
pub subject: String,
pub exp: Option<u64>,
pub kid: Kid,
}Expand description
The signed payload: { purpose, subject, exp?, kid }.
purpose scopes a token to one use (email-signup.confirm,
waitlist.status, …) and must be module-qualified: the module part
is the module binding (ADR 0014, issue #137) — a token minted by one
module can never verify for another because the full purpose is
compared. exp is a Unix timestamp in seconds. Every purpose carries
an explicit lifetime: the reference signer clamps over-long or missing
expiries to its crate::TokenPolicy (issue #137), so a non-expiring
token is a deliberate policy decision, never an omission. Venture and
environment binding is stamped and enforced by the signer itself, not
carried here: modules hand the same payload shape to every runtime.
Fields§
§purpose: String§subject: String§exp: Option<u64>§kid: KidTrait Implementations§
impl Eq for Payload
impl StructuralPartialEq for Payload
Auto Trait Implementations§
impl Freeze for Payload
impl RefUnwindSafe for Payload
impl Send for Payload
impl Sync for Payload
impl Unpin for Payload
impl UnsafeUnpin for Payload
impl UnwindSafe for Payload
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.