pub struct InvitePayload {
pub version: u8,
pub network_id: String,
pub network_meta_key_hex: String,
pub inviter_fingerprint: String,
pub inviter_pubkey_hex: String,
pub invitee_fingerprint: Option<String>,
pub expires_at: u64,
pub nonce_hex: String,
}Expand description
The plaintext content of an invite token.
Serialised to JSON before signing and encryption.
Fields§
§version: u8Format version — currently 1.
network_id: StringNetwork the invitee is being invited to.
network_meta_key_hex: StringHex-encoded 32-byte NetworkMetaKey for network_id.
This is the secret — it must never be transmitted in plaintext.
inviter_fingerprint: StringHex fingerprint of the inviter (for display / audit).
inviter_pubkey_hex: StringHex-encoded protobuf-serialised public key of the inviter.
Included so the recipient can verify the signature without already being in the network.
invitee_fingerprint: Option<String>Optional: if Some, only this fingerprint should redeem the token.
None = open invite (anyone who has the password can redeem it).
expires_at: u64Unix timestamp after which the token is considered expired.
nonce_hex: StringRandom 16-byte hex nonce — prevents replay of the same token.
Trait Implementations§
Source§impl Clone for InvitePayload
impl Clone for InvitePayload
Source§fn clone(&self) -> InvitePayload
fn clone(&self) -> InvitePayload
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InvitePayload
impl Debug for InvitePayload
Source§impl<'de> Deserialize<'de> for InvitePayload
impl<'de> Deserialize<'de> for InvitePayload
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for InvitePayload
impl RefUnwindSafe for InvitePayload
impl Send for InvitePayload
impl Sync for InvitePayload
impl Unpin for InvitePayload
impl UnwindSafe for InvitePayload
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more