Skip to main content

NativeAssertionBridge

Struct NativeAssertionBridge 

Source
pub struct NativeAssertionBridge { /* private fields */ }
Expand description

A host may replace its delivery channel after a webview reload without changing the authenticated epoch. Logout/account replacement must retire this bridge; Rust capabilities observe that epoch change immediately.

Implementations§

Source§

impl NativeAssertionBridge

Source

pub fn new( session_key: String, sink: impl Fn(NativeAssertionRequest) -> Result<(), String> + Send + Sync + 'static, ) -> Result<Self>

Source

pub fn rebind( &self, sink: impl Fn(NativeAssertionRequest) -> Result<(), String> + Send + Sync + 'static, ) -> Result<()>

Source

pub fn complete( &self, request_id: &str, result: Result<IdentityAssertion, String>, ) -> Result<bool>

Complete only the request issued to the current delivery channel. Late or duplicate replies cannot install identity material for another epoch.

Source

pub fn retire(&self) -> Result<()>

Trait Implementations§

Source§

impl AssertionProvider for NativeAssertionBridge

Source§

fn assertion<'life0, 'async_trait>( &'life0 self, __arg1: bool, ) -> Pin<Box<dyn Future<Output = Result<IdentityAssertion>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn assertion_for_device<'life0, 'life1, 'async_trait>( &'life0 self, refresh: bool, device: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<IdentityAssertion>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Returns an assertion for the exact durable installation being enrolled. Read more
Source§

fn assertion_for_device_recovery<'life0, 'life1, 'async_trait>( &'life0 self, device: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<IdentityAssertion>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Returns a newly authorized assertion after OpenRTC reports that this installation ID is bound to a different public key. Consumer backends should require recent interactive authentication before adding their recovery authorization claim. This is never called for another 412.
Source§

fn session_key(&self) -> Result<Option<String>>

Stable, non-secret local identifier for one signed-in principal. It changes on login/logout/account switch, never on access-token refresh. OpenRTC hashes it with the app and install-key thumbprint before asking the certificate store for a cold-start lookup. None preserves the RC assertion-first compatibility behavior.
Source§

fn identity_epoch(&self) -> u64

Monotonic application-owned login epoch. Increment it only for login, logout, account switch, or explicit revocation–never for an ordinary OAuth access-token refresh.
Source§

fn subscribe_identity_epoch(&self) -> Option<Receiver<u64>>

Optional immediate epoch observer. OpenRTC closes every capability created under the old epoch when this value changes. Hosts without an observer must explicitly close their handles during logout/account switch; grant renewal still fails closed if identity_epoch() changed.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> SendSyncBound for T
where T: Send + Sync,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more