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§
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.