pub struct OwnUserIdentityData { /* private fields */ }
Expand description
Struct representing a cross signing identity of our own user.
This is the user identity of our own user. This user identity will contain a master key, self signing key as well as a user signing key.
This identity can verify other identities as well as devices belonging to the identity.
Implementations§
Source§impl OwnUserIdentityData
impl OwnUserIdentityData
Sourcepub fn master_key(&self) -> &MasterPubkey
pub fn master_key(&self) -> &MasterPubkey
Get the public master key of the identity.
Sourcepub fn self_signing_key(&self) -> &SelfSigningPubkey
pub fn self_signing_key(&self) -> &SelfSigningPubkey
Get the public self-signing key of the identity.
Sourcepub fn user_signing_key(&self) -> &UserSigningPubkey
pub fn user_signing_key(&self) -> &UserSigningPubkey
Get the public user-signing key of the identity.
Sourcepub fn is_identity_verified(&self, identity: &OtherUserIdentityData) -> bool
pub fn is_identity_verified(&self, identity: &OtherUserIdentityData) -> bool
Check if the given user identity has been verified.
The identity of another user is verified iff our own identity is verified and if our own identity has signed the other user’s identity.
§Arguments
identity
- The identity of another user which we want to check has been verified.
Sourcepub fn mark_as_verified(&self)
pub fn mark_as_verified(&self)
Mark our identity as verified.
Sourcepub fn is_verified(&self) -> bool
pub fn is_verified(&self) -> bool
Check if our identity is verified.
Sourcepub fn was_previously_verified(&self) -> bool
pub fn was_previously_verified(&self) -> bool
True if we verified our own identity at some point in the past.
To reset this latch back to false
, one must call
OwnUserIdentityData::withdraw_verification()
.
Sourcepub fn withdraw_verification(&self)
pub fn withdraw_verification(&self)
Remove the requirement for this identity to be verified.
If an identity was previously verified and is not any more it will be reported to the user. In order to remove this notice users have to verify again or to withdraw the verification requirement.
Sourcepub fn has_verification_violation(&self) -> bool
pub fn has_verification_violation(&self) -> bool
Was this identity previously verified, and is no longer?
Such a violation should be reported to the local user by the application, and resolved by
- Verifying the new identity with
OwnUserIdentity::request_verification
- Or by withdrawing the verification requirement
OwnUserIdentity::withdraw_verification
.
Trait Implementations§
Source§impl Clone for OwnUserIdentityData
impl Clone for OwnUserIdentityData
Source§fn clone(&self) -> OwnUserIdentityData
fn clone(&self) -> OwnUserIdentityData
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for OwnUserIdentityData
impl Debug for OwnUserIdentityData
Source§impl<'de> Deserialize<'de> for OwnUserIdentityData
impl<'de> Deserialize<'de> for OwnUserIdentityData
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>,
Source§impl From<OwnUserIdentityData> for UserIdentityData
impl From<OwnUserIdentityData> for UserIdentityData
Source§fn from(identity: OwnUserIdentityData) -> Self
fn from(identity: OwnUserIdentityData) -> Self
Source§impl PartialEq for OwnUserIdentityData
impl PartialEq for OwnUserIdentityData
Source§fn eq(&self, other: &Self) -> bool
fn eq(&self, other: &Self) -> bool
The PartialEq
implementation compares several attributes, including
the user ID, key material, usage, and, notably, the signatures of
the master key.
This approach contrasts with the PartialEq
implementation of the
MasterPubkey
, SelfSigningPubkey
and UserSigningPubkey
types,
where the signatures are disregarded. This distinction arises from our
treatment of identity as the combined representation of cross-signing
keys and the associated verification state.
The verification state of an identity depends on the signatures of the
master key, requiring their inclusion in our PartialEq
implementation.
Auto Trait Implementations§
impl Freeze for OwnUserIdentityData
impl RefUnwindSafe for OwnUserIdentityData
impl Send for OwnUserIdentityData
impl Sync for OwnUserIdentityData
impl Unpin for OwnUserIdentityData
impl UnwindSafe for OwnUserIdentityData
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> CompatExt for T
impl<T> CompatExt for T
Source§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
Source§fn consume_handle(handle: Handle) -> Arc<T>
fn consume_handle(handle: Handle) -> Arc<T>
Arc<>
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§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>
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>
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