[][src]Function tokio_ddmw::auth::token

pub async fn token<T: AsyncRead + AsyncWrite + Unpin, '_, '_>(
    conn: &'_ mut Framed<T, Codec>,
    tkn: &'_ Token
) -> Result<(), Error>

Attempt to authenticate using an authentication token. The token is either loaded from a file or stored in memory as a string. If the caller requested to load a token from a file, but that file can not be read, an error will be returned.