pub struct DittoAuthenticator { /* private fields */ }
Expand description

Handle to trigger actual authentication requests

Implementations

Asks the Ditto AuthClient to make an Auth Request to the configured Identity’s auth url with a single token paramater.

  • token - An auth or API token you have configured.
  • provider - The name of an authentication provider web hook you have configured in Ditto Cloud, which will accept the token and contact your Auth service

Log out of Ditto Shutdown all replication sessions and remove any cached authentication credentials. This does not remove the local data store.

Query whether Ditto has a valid authentication token.

This will only be true when using an Online or an OnlineWithAuthentication identity, after a successful login. If the authentication token is allowed to expire then it will return false instead.

The currently logged-in user ID.

This will return None if there is no valid authentication or OnlineWithAuthentication/Online mode is not being used.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Converts to T by calling Into<T>::into.
Tries to convert to T by calling TryInto<T>::try_into.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.