Trait dittolive_ditto::auth::DittoAuthenticationEventHandler[][src]

pub trait DittoAuthenticationEventHandler: Send + Sync {
    fn authentication_required(&self, auth: DittoAuthenticator);
fn authentication_expiring_soon(
        auth: DittoAuthenticator,
        seconds_remaining: Duration
    ); }
Expand description

Implement this trait for a type in order to construct an Online or an OnlineWithAuthentication identity.

Required methods

This will be called when you need to authenticate. Usually it will involve a call to auth.login_with_token

Allows for custom behavior hooks when authentication is expiring