pub struct HttpPairingRelayClient { /* private fields */ }Expand description
HTTP-backed implementation of PairingRelayClient.
Uses WebSocket for real-time session updates with HTTP polling as a fallback when WebSocket is unavailable.
Usage:
ⓘ
use auths_infra_http::HttpPairingRelayClient;
let relay = HttpPairingRelayClient::new();
let response = relay.create_session("https://registry.example.com", &request).await?;Implementations§
Trait Implementations§
Source§impl Default for HttpPairingRelayClient
impl Default for HttpPairingRelayClient
Source§impl PairingRelayClient for HttpPairingRelayClient
impl PairingRelayClient for HttpPairingRelayClient
Source§fn create_session(
&self,
registry_url: &str,
request: &CreateSessionRequest,
) -> impl Future<Output = Result<CreateSessionResponse, NetworkError>> + Send
fn create_session( &self, registry_url: &str, request: &CreateSessionRequest, ) -> impl Future<Output = Result<CreateSessionResponse, NetworkError>> + Send
Creates a new pairing session on the relay server. Read more
Source§fn get_session(
&self,
registry_url: &str,
session_id: &str,
) -> impl Future<Output = Result<GetSessionResponse, NetworkError>> + Send
fn get_session( &self, registry_url: &str, session_id: &str, ) -> impl Future<Output = Result<GetSessionResponse, NetworkError>> + Send
Fetches the current state of a pairing session. Read more
Source§fn lookup_by_code(
&self,
registry_url: &str,
code: &str,
) -> impl Future<Output = Result<GetSessionResponse, NetworkError>> + Send
fn lookup_by_code( &self, registry_url: &str, code: &str, ) -> impl Future<Output = Result<GetSessionResponse, NetworkError>> + Send
Looks up a session by its short human-readable code. Read more
Source§fn submit_response(
&self,
registry_url: &str,
session_id: &str,
response: &SubmitResponseRequest,
) -> impl Future<Output = Result<(), NetworkError>> + Send
fn submit_response( &self, registry_url: &str, session_id: &str, response: &SubmitResponseRequest, ) -> impl Future<Output = Result<(), NetworkError>> + Send
Submits a device pairing response to a session. Read more
Source§fn submit_confirmation(
&self,
registry_url: &str,
session_id: &str,
request: &SubmitConfirmationRequest,
) -> impl Future<Output = Result<(), NetworkError>> + Send
fn submit_confirmation( &self, registry_url: &str, session_id: &str, request: &SubmitConfirmationRequest, ) -> impl Future<Output = Result<(), NetworkError>> + Send
Submits a SAS confirmation (encrypted attestation or abort signal). Read more
Source§fn get_confirmation(
&self,
registry_url: &str,
session_id: &str,
) -> impl Future<Output = Result<GetConfirmationResponse, NetworkError>> + Send
fn get_confirmation( &self, registry_url: &str, session_id: &str, ) -> impl Future<Output = Result<GetConfirmationResponse, NetworkError>> + Send
Polls for a SAS confirmation from the initiator. Read more
Source§fn wait_for_update(
&self,
registry_url: &str,
session_id: &str,
timeout: Duration,
) -> impl Future<Output = Result<Option<GetSessionResponse>, NetworkError>> + Send
fn wait_for_update( &self, registry_url: &str, session_id: &str, timeout: Duration, ) -> impl Future<Output = Result<Option<GetSessionResponse>, NetworkError>> + Send
Waits for a session to reach a terminal state, using WebSocket with HTTP polling fallback. Read more
Auto Trait Implementations§
impl Freeze for HttpPairingRelayClient
impl !RefUnwindSafe for HttpPairingRelayClient
impl Send for HttpPairingRelayClient
impl Sync for HttpPairingRelayClient
impl Unpin for HttpPairingRelayClient
impl UnsafeUnpin for HttpPairingRelayClient
impl !UnwindSafe for HttpPairingRelayClient
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