pub struct CredentialRequest {
pub ephemeral_hpke_pubkey: Option<HpkePubkey>,
pub one_time_secret: OneTimeSecret,
pub params: CredentialRequestParams,
}Expand description
A credential request, as carried by a connection string.
Fields§
§ephemeral_hpke_pubkey: Option<HpkePubkey>Fresh per request; the response is HPKE-encrypted under it.
Required unless delivery is Delivery::Post.
one_time_secret: OneTimeSecretFresh per request; echoed in the response so it can be matched.
params: CredentialRequestParamsImplementations§
Source§impl CredentialRequest
impl CredentialRequest
Sourcepub const LEXE_BASE_URL: &str = "https://lexe.app/connect"
pub const LEXE_BASE_URL: &str = "https://lexe.app/connect"
Lexe’s connect url; every connection string starts with it.
Sourcepub fn parse(s: &str) -> Result<Self, RequestError>
pub fn parse(s: &str) -> Result<Self, RequestError>
Parse a connection string. Unrecognized params are dropped.
Source§impl CredentialRequest
impl CredentialRequest
Sourcepub fn mailbox_address(&self) -> Address
pub fn mailbox_address(&self) -> Address
Where a mailbox response is deposited: SHA256(hpke_info).
Source§impl CredentialRequest
impl CredentialRequest
pub fn requester_display(&self) -> RequesterDisplay
Sourcepub fn requester_branding(&self) -> Option<RequesterBranding>
pub fn requester_branding(&self) -> Option<RequesterBranding>
The REQUESTER’s requester_name and requester_icon, if its
receiving domain is in VERIFIED_REQUESTERS.
A non-https:// icon is dropped.
Sourcepub fn respond(
&self,
rng: &mut impl Crng,
outcome: Outcome,
) -> Result<DeliveryAction, RespondError>
pub fn respond( &self, rng: &mut impl Crng, outcome: Outcome, ) -> Result<DeliveryAction, RespondError>
Build the response for outcome and package it for delivery.
Trait Implementations§
Source§impl Clone for CredentialRequest
impl Clone for CredentialRequest
Source§impl Debug for CredentialRequest
impl Debug for CredentialRequest
Source§impl Display for CredentialRequest
Renders the connection string; the inverse of CredentialRequest::parse.
impl Display for CredentialRequest
Renders the connection string; the inverse of CredentialRequest::parse.
impl Eq for CredentialRequest
Source§impl PartialEq for CredentialRequest
impl PartialEq for CredentialRequest
impl StructuralPartialEq for CredentialRequest
Auto Trait Implementations§
impl Freeze for CredentialRequest
impl RefUnwindSafe for CredentialRequest
impl Send for CredentialRequest
impl Sync for CredentialRequest
impl Unpin for CredentialRequest
impl UnsafeUnpin for CredentialRequest
impl UnwindSafe for CredentialRequest
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,
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§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
Compare self to
key and return true if they are equal.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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.