Trait dittolive_ditto::identity::Identity [−][src]
pub trait Identity: Sealed + Send + Sync {
fn site_id(&self) -> SiteId;
fn auth_client(&self) -> Arc<BoxedAuthClient>;
fn authenticator(&self) -> Option<DittoAuthenticator>;
fn make_listener(
&self,
transports: Arc<RwLock<Transports>>
) -> Option<Arc<ValidityListener>>;
fn app_id(&self) -> Option<&AppId>;
fn ditto_root(&self) -> Arc<dyn DittoRoot>;
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;
}
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: Arc<RwLock<Transports>>
) -> Option<Arc<ValidityListener>>
fn make_listener(
&self,
transports: Arc<RwLock<Transports>>
) -> Option<Arc<ValidityListener>>
Constructs a ValidityListener
given a shared reference to the Ditto
Transports
fn ditto_root(&self) -> Arc<dyn DittoRoot>
fn ditto_root(&self) -> Arc<dyn DittoRoot>
Returns the current DittoRoot
fn is_web_valid(&self) -> bool
fn is_web_valid(&self) -> bool
Returns if the curernt 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.