Struct dittolive_ditto::identity::SharedKey [−][src]
pub struct SharedKey { /* fields omitted */ }
Expand description
An identity where any device is trusted provided they know the secret key. This is a simplistic authentication model normally only suitable for private apps where users and devices are both trusted. In this mode, any string may be used as the app id.
Implementations
Construct a SharedKey
Identity
ditto_root
- An instance ofDittoRoot
for local storageapp_id
- The unique UUIDv4 identifying this app; must be shared across all instanceskey_der_b64
- A pre-shared key for securing peer-to-peer communication encoded as a Base64 string
Trait Implementations
Returns a shared reference to the underlying AuthClient
Returns the current DittoRoot
Returns if the curernt web auth token is valid
Returns if the configured x509 certificate is valid
Returns the configured URL for Auth
Returns the configured URL for websocket sync
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
Read more
Indicates if cloud sync should be enabled by default
Indicates whether the specific Identity type requires an offline only license token to be set.
Auto Trait Implementations
impl !RefUnwindSafe for SharedKey
impl !UnwindSafe for SharedKey
Blanket Implementations
Mutably borrows from an owned value. Read more