mirror of
https://gitlab.com/xmpp-rs/xmpp-rs.git
synced 2024-07-12 22:21:53 +00:00
Force channel binding to None
This commit is contained in:
parent
df423e5047
commit
973a5ca659
2 changed files with 8 additions and 7 deletions
|
@ -4,7 +4,7 @@ use futures::*;
|
||||||
use tokio_io::{AsyncRead, AsyncWrite};
|
use tokio_io::{AsyncRead, AsyncWrite};
|
||||||
use tokio_io::codec::Framed;
|
use tokio_io::codec::Framed;
|
||||||
use xml;
|
use xml;
|
||||||
use sasl::common::Credentials;
|
use sasl::common::{Credentials, ChannelBinding};
|
||||||
use jid::Jid;
|
use jid::Jid;
|
||||||
|
|
||||||
use xmpp_codec::*;
|
use xmpp_codec::*;
|
||||||
|
@ -55,7 +55,8 @@ impl<S: AsyncRead + AsyncWrite> XMPPStream<S> {
|
||||||
pub fn auth(self, username: String, password: String) -> Result<ClientAuth<S>, String> {
|
pub fn auth(self, username: String, password: String) -> Result<ClientAuth<S>, String> {
|
||||||
let creds = Credentials::default()
|
let creds = Credentials::default()
|
||||||
.with_username(username)
|
.with_username(username)
|
||||||
.with_password(password);
|
.with_password(password)
|
||||||
|
.with_channel_binding(ChannelBinding::None);
|
||||||
ClientAuth::new(self, creds)
|
ClientAuth::new(self, creds)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue