Skip to main content

sign_in_with_tokens

Function sign_in_with_tokens 

Source
pub(crate) async fn sign_in_with_tokens<T, C, CF, K, KF>(
    login: &str,
    connect: C,
    token: K,
    oauth: OAuth,
) -> Result<Session<T>, SyncError>
where T: AsyncRead + AsyncWrite + Unpin + Debug + Send, C: Fn() -> CF, CF: Future<Output = Result<Client<T>, SyncError>>, K: Fn(bool) -> KF, KF: Future<Output = Result<String, SyncError>>,
Expand description

AUTHENTICATE XOAUTH2 on connections connect makes, with the tokens token gives: the one kept first; refused, a fresh one, once (the one kept may have ended early: a password changed, the access withdrawn); refused again, the access must be given again.