[−][src]Function tokio_ddmw::auth::authenticate
pub async fn authenticate<T: AsyncRead + AsyncWrite + Unpin, '_, '_>(
conn: &'_ mut Framed<T, Codec>,
ai: &'_ AuthInfo
) -> Result<Option<String>, Error>
Helper function for authenticating a connection.
- Attempt to authenticate using token, if one was supplied (either by buffer or filename).
- If token authentication failed, and account name and passphrase was supplied, then attempt to authenticate with the account name and passphrase.
- If an output token file name was supplied, then save the returned authentication to that file.