Trait dittolive_ditto::identity::Identity
source · [−]pub trait Identity: Sealed + Send + Sync {
fn auth_client(&self) -> Arc<BoxedAuthClient>;
fn authenticator(&self) -> Option<DittoAuthenticator>;
fn make_listener(
&self,
transports: Weak<RwLock<TransportSync>>
) -> Option<Arc<ValidityListener>>;
fn is_web_valid(&self) -> bool;
fn is_x509_valid(&self) -> bool;
fn is_cloud_sync_enabled(&self) -> bool;
fn auth_url(&self) -> Result<String, DittoError>;
fn sync_url(&self) -> Result<String, DittoError>;
fn requires_offline_only_license_token(&self) -> bool;
fn site_id(&self) -> SiteId { ... }
fn app_id(&self) -> AppId { ... }
}
Required methods
fn auth_client(&self) -> Arc<BoxedAuthClient>
fn auth_client(&self) -> Arc<BoxedAuthClient>
Returns a shared reference to the underlying AuthClient
fn authenticator(&self) -> Option<DittoAuthenticator>
fn authenticator(&self) -> Option<DittoAuthenticator>
Returns the underlying DittoAuthenticator
if specified
fn make_listener(
&self,
transports: Weak<RwLock<TransportSync>>
) -> Option<Arc<ValidityListener>>
fn make_listener(
&self,
transports: Weak<RwLock<TransportSync>>
) -> Option<Arc<ValidityListener>>
Constructs a ValidityListener
given a shared reference to the Ditto
Transports
fn is_web_valid(&self) -> bool
fn is_web_valid(&self) -> bool
Returns if the current web auth token is valid
fn is_x509_valid(&self) -> bool
fn is_x509_valid(&self) -> bool
Returns if the configured x509 certificate is valid
fn is_cloud_sync_enabled(&self) -> bool
fn is_cloud_sync_enabled(&self) -> bool
Indicates if cloud sync should be enabled by default
fn auth_url(&self) -> Result<String, DittoError>
fn auth_url(&self) -> Result<String, DittoError>
Returns the configured URL for Auth
fn sync_url(&self) -> Result<String, DittoError>
fn sync_url(&self) -> Result<String, DittoError>
Returns the configured URL for websocket sync
fn requires_offline_only_license_token(&self) -> bool
fn requires_offline_only_license_token(&self) -> bool
Indicates whether the specific Identity type requires an offline only license token to be set.