From 7c2577d196c059ab6e2d5b0efe5e036bdad75be7 Mon Sep 17 00:00:00 2001 From: cel 🌸 Date: Tue, 3 Dec 2024 03:51:26 +0000 Subject: implement remaining rfc6120 xml schemas --- src/lib.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs index 88b91a6..681d1d0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -9,14 +9,20 @@ pub mod jid; pub mod stanza; pub use connection::Connection; +use connection::Tls; pub use error::Error; pub use jabber::Jabber; pub use jid::JID; pub type Result = std::result::Result; -pub async fn login, P: AsRef>(jid: J, password: P) -> Result { - todo!() +pub async fn login, P: AsRef>(jid: J, password: P) -> Result> { + Ok(Connection::connect_user(jid, password.as_ref().to_string()) + .await? + .ensure_tls() + .await? + .negotiate() + .await?) } #[cfg(test)] -- cgit