pub struct MemberReauth {
pub community_id: CommunityId,
pub host_id: HostId,
pub delegation_epoch: u64,
pub host_challenge: Challenge,
pub member_public_key: PublicKey,
pub issued_at: u64,
}Expand description
Signed by the member key. Binds the challenge to the community, the new host and the delegation epoch it operates under, so a proof made for one host or epoch is useless at another.
Fields§
§community_id: CommunityId2: the community.
host_id: HostId3: the host this proof is made to.
delegation_epoch: u644: the delegation epoch of that host (from its welcome’s proof).
host_challenge: Challenge5: from this connection’s latest session.welcome.
member_public_key: PublicKey6: the member key; the signer.
issued_at: u647: ms since the epoch.
Implementations§
Source§impl MemberReauth
impl MemberReauth
Sourcepub fn verify_for_host(
signed: &SignedJson,
member_public_key: &PublicKey,
expected: &ReauthExpectation,
min_suite: u8,
) -> Result<Signed<Self>, RegistrationError>
pub fn verify_for_host( signed: &SignedJson, member_public_key: &PublicKey, expected: &ReauthExpectation, min_suite: u8, ) -> Result<Signed<Self>, RegistrationError>
The host’s check: verifies under the command’s member_public_key (never a key read
from the bytes), then requires field 6 to be that key and fields 2–5 to match.
Consuming the challenge is the caller’s job.
§Errors
RegistrationError for a bad signature, encoding or mismatch (an epoch mismatch is
RegistrationError::Host: the proof was made for another delegation of a host).
Trait Implementations§
Source§impl Clone for MemberReauth
impl Clone for MemberReauth
Source§fn clone(&self) -> MemberReauth
fn clone(&self) -> MemberReauth
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MemberReauth
impl Debug for MemberReauth
Source§impl Decode for MemberReauth
impl Decode for MemberReauth
Source§impl Encode for MemberReauth
impl Encode for MemberReauth
impl Eq for MemberReauth
Source§impl PartialEq for MemberReauth
impl PartialEq for MemberReauth
Source§impl SignedObject for MemberReauth
impl SignedObject for MemberReauth
Source§const CONTEXT: Context = Context::MemberReauth
const CONTEXT: Context = Context::MemberReauth
Source§fn decode_unverified(bytes: &[u8]) -> Result<Self, DecodeError>
fn decode_unverified(bytes: &[u8]) -> Result<Self, DecodeError>
Signed::verify_and_decode. Read more