Struct dittolive_ditto::auth::DittoAuthenticator [−][src]
pub struct DittoAuthenticator { /* fields omitted */ }
Expand description
Handle to trigger actual authentication requests
Implementations
Asks the Ditto AuthClient to make an Auth Request to the configured Identitie’s auth url with a single token parameter.
token
- An auth or API token you have configuredprovider
- The name of an authentication provider web hook you have configured in Ditto Cloud, which will accept thetoken
and contact your Auth service
pub fn login_with_credentials(
&self,
username: &str,
password: &str,
provider: &str
) -> Result<(), DittoError>
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.
Log out of Ditto Shutdown all replication sessions and remove any cached authentication credentials. This does not remove the local data store.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for DittoAuthenticator
impl Send for DittoAuthenticator
impl Sync for DittoAuthenticator
impl Unpin for DittoAuthenticator
impl UnwindSafe for DittoAuthenticator
Blanket Implementations
Mutably borrows from an owned value. Read more