tokio-xmpp: publish auth method

This commit is contained in:
Jonas Schäfer 2025-11-12 12:07:32 +01:00
commit 3bda04124e
4 changed files with 10 additions and 1 deletions

View file

@ -23,6 +23,11 @@ use crate::{
},
};
/// Run the authentication handshake on a given stream.
///
/// Uses the given `sasl_mechanisms` and `creds` to perform the full
/// authentication handshake. As authentication ends with a stream reset,
/// this returns the `stream` as [`InitiatingStream`] on success.
pub async fn auth<S: AsyncBufRead + AsyncWrite + Unpin>(
mut stream: XmppStream<S>,
sasl_mechanisms: &SaslMechanisms,

View file

@ -28,6 +28,7 @@ use crate::connect::TcpServerConnector;
mod iq;
pub(crate) mod login;
mod stream;
pub use login::auth;
pub use iq::{IqFailure, IqRequest, IqResponse, IqResponseToken};