tokio-xmpp: publish auth method
This commit is contained in:
parent
65c3e0dee7
commit
3bda04124e
4 changed files with 10 additions and 1 deletions
|
|
@ -1,5 +1,8 @@
|
|||
Version NEXT:
|
||||
0000-00-00 RELEASER <releaser@domain>
|
||||
* Added:
|
||||
- Expose `client_auth` method to allow manual stream setups for advanced
|
||||
use cases.
|
||||
* Fixed:
|
||||
- Ignore missing "version" stream attribute for 0114 components.
|
||||
- Gate `AsRawFd` behind `ktls` feature to make Windows build work again.
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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};
|
||||
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ pub use xso::{asxml::PrintRawXml, error::FromElementError};
|
|||
#[doc(inline)]
|
||||
/// Generic tokio_xmpp Error
|
||||
pub use crate::error::Error;
|
||||
pub use client::{Client, IqFailure, IqRequest, IqResponse, IqResponseToken};
|
||||
pub use client::{auth as client_login, Client, IqFailure, IqRequest, IqResponse, IqResponseToken};
|
||||
#[cfg(feature = "insecure-tcp")]
|
||||
pub use component::Component;
|
||||
pub use event::{Event, Stanza};
|
||||
|
|
|
|||
Loading…
Reference in a new issue