pub struct AuthInfo {
pub signature: Option<String>,
pub key: SigKey,
}Expand description
Authentication information embedded in an entry
Fields§
§signature: Option<String>Authentication signature - base64-encoded signature bytes Optional to allow for entry creation before signing
Serialized as sig to keep the wire format, and therefore every existing
entry ID, unchanged.
key: SigKeyKey lookup hint
Implementations§
Source§impl AuthInfo
impl AuthInfo
Sourcepub fn from_pubkey(pubkey: &PublicKey) -> Self
pub fn from_pubkey(pubkey: &PublicKey) -> Self
Create a new AuthInfo with a pubkey hint
Sourcepub fn builder() -> AuthInfoBuilder
pub fn builder() -> AuthInfoBuilder
Create a new AuthInfoBuilder for constructing AuthInfo instances
Sourcepub fn is_unsigned(&self) -> bool
pub fn is_unsigned(&self) -> bool
Check if this represents an unsigned/unauthenticated entry.
An entry is unsigned when AuthInfo is in its default state:
- Direct SigKey (not Delegation)
- Empty KeyHint (no pubkey, no name)
- No signature
Sourcepub fn malformed_reason(&self) -> Option<&'static str>
pub fn malformed_reason(&self) -> Option<&'static str>
Check if this represents a malformed/inconsistent signature state.
Returns Some(reason) if malformed, None if valid.
Malformed states:
- Direct with hint but no signature (can’t verify without signature)
- Direct with signature but no hint (can’t verify without knowing which key)
- Delegation with no signature (delegation always requires signature)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AuthInfo
impl<'de> Deserialize<'de> for AuthInfo
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
impl Eq for AuthInfo
impl StructuralPartialEq for AuthInfo
Auto Trait Implementations§
impl Freeze for AuthInfo
impl RefUnwindSafe for AuthInfo
impl Send for AuthInfo
impl Sync for AuthInfo
impl Unpin for AuthInfo
impl UnsafeUnpin for AuthInfo
impl UnwindSafe for AuthInfo
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§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