pub trait ServerCommunicationConfigPlatformApi: Send + Sync {
// Required method
fn acquire_cookies<'life0, 'async_trait>(
&'life0 self,
hostname: 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 for the given hostname
The platform client should trigger any necessary user interaction (e.g., browser redirect to IdP) to acquire cookies from the load balancer.
For sharded cookies, the platform should return multiple AcquiredCookie
entries, each with its full name including the -{N} suffix.
§Arguments
hostname- The server hostname (e.g., “vault.acme.com”)
§Returns
Some(cookies)- Cookies were successfully acquiredNone- Cookie acquisition failed or was cancelled