Skip to main content

ServerCommunicationConfigPlatformApi

Trait ServerCommunicationConfigPlatformApi 

Source
pub trait ServerCommunicationConfigPlatformApi: Send + Sync {
    // Required method
    fn acquire_cookies<'life0, 'async_trait>(
        &'life0 self,
        vault_url: String,
    ) -> Pin<Box<dyn Future<Output = Option<Vec<AcquiredCookie>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Platform API for acquiring cookies from the platform client

This trait abstracts the platform-specific logic for acquiring SSO cookies from load balancers. Platform clients (web, mobile, desktop) implement this trait to provide cookie acquisition through browser interactions or native HTTP client capabilities.

Required Methods§

Source

fn acquire_cookies<'life0, 'async_trait>( &'life0 self, vault_url: String, ) -> Pin<Box<dyn Future<Output = Option<Vec<AcquiredCookie>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Acquires cookies using the provided vault URL

The platform client should trigger any necessary user interaction (e.g., browser redirect to IdP) to acquire cookies from the load balancer.

§Parameters
  • vault_url: The full vault URL (scheme + host + port, e.g., "https://vault.bitwarden.com" or "https://localhost:8000"). This URL is used for constructing the redirect URL.
§Returns

Returns Some(Vec<AcquiredCookie>) if cookies were successfully acquired, or None if the operation was cancelled or failed.

Trait Implementations§

Source§

impl<T> FfiConverterArc<T> for dyn ServerCommunicationConfigPlatformApi

Source§

const TYPE_ID_META: MetadataBuffer

Source§

type FfiType = Handle

Source§

fn lower(obj: Arc<Self>) -> Self::FfiType

Source§

fn try_lift(handle: Self::FfiType) -> Result<Arc<Self>>

Source§

fn write(obj: Arc<Self>, buf: &mut Vec<u8>)

Source§

fn try_read(buf: &mut &[u8]) -> Result<Arc<Self>>

Source§

impl<T> LiftRef<T> for dyn ServerCommunicationConfigPlatformApi

Implementors§