pub struct Discharge {
pub presence: Presence,
pub credential_id: Vec<u8>,
pub challenge: [u8; 32],
pub signature: Vec<u8>,
pub authenticator_data: Option<Vec<u8>>,
pub client_data_json: Option<Vec<u8>>,
}Expand description
A human-presence proof presented to the gate. Crypto-format-agnostic: the
signature and credential_id are opaque bytes a DischargeVerifier
interprets (e.g. the Ed25519Verifier reads them as a raw ed25519 verifying
key + assertion, under the verifier-ed25519 feature).
Fields§
§presence: PresenceThe gesture strength actually achieved (e.g. user-presence vs. verified).
credential_id: Vec<u8>Which authenticator/credential produced the proof (a public-key id).
challenge: [u8; 32]The challenge bytes the authenticator signed.
signature: Vec<u8>The assertion signature. For the raw-Ed25519 path this signs the
challenge directly; for the WebAuthn path it signs
authenticator_data ‖ SHA-256(client_data_json).
authenticator_data: Option<Vec<u8>>WebAuthn authenticatorData (binary: rpIdHash‖flags‖signCount‖…), set
only when the proof is a WebAuthn/CTAP2 assertion ([WebAuthnVerifier]).
None for the raw-Ed25519 path. Backward-compatible on the wire.
client_data_json: Option<Vec<u8>>WebAuthn clientDataJSON (the raw UTF-8 bytes the authenticator hashed),
set only for a WebAuthn assertion; carries the base64url-encoded
challenge the verifier binds against. None for the raw-Ed25519 path.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Discharge
impl<'de> Deserialize<'de> for Discharge
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Discharge, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Discharge, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for Discharge
Source§impl Serialize for Discharge
impl Serialize for Discharge
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for Discharge
Auto Trait Implementations§
impl Freeze for Discharge
impl RefUnwindSafe for Discharge
impl Send for Discharge
impl Sync for Discharge
impl Unpin for Discharge
impl UnsafeUnpin for Discharge
impl UnwindSafe for Discharge
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<F, T> ConvertInto<T> for Fwhere
T: ConvertFrom<F>,
impl<F, T> ConvertInto<T> for Fwhere
T: ConvertFrom<F>,
Source§fn convert_into(self) -> T
fn convert_into(self) -> T
Self to a value of type T.Source§impl<F, T> ConvertTryFrom<F> for Twhere
F: ConvertInto<T>,
impl<F, T> ConvertTryFrom<F> for Twhere
F: ConvertInto<T>,
Source§impl<F, T> ConvertTryInto<T> for Fwhere
T: ConvertTryFrom<F>,
impl<F, T> ConvertTryInto<T> for Fwhere
T: ConvertTryFrom<F>,
Source§type Error = <T as ConvertTryFrom<F>>::Error
type Error = <T as ConvertTryFrom<F>>::Error
Source§fn convert_try_into(self) -> Result<T, <T as ConvertTryFrom<F>>::Error>
fn convert_try_into(self) -> Result<T, <T as ConvertTryFrom<F>>::Error>
Self to a value of type T.impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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