@@ -27,7 +27,7 @@ impl<T: SessionStream> Session<T> {
|
||||
mut params: Vec<String>,
|
||||
) -> trc::Result<()> {
|
||||
match mechanism {
|
||||
Mechanism::Plain | Mechanism::OAuthBearer => {
|
||||
Mechanism::Plain | Mechanism::OAuthBearer | Mechanism::XOauth2 => {
|
||||
if !params.is_empty() {
|
||||
let credentials = base64_decode(params.pop().unwrap().as_bytes())
|
||||
.and_then(|challenge| {
|
||||
|
||||
@@ -19,9 +19,9 @@ pub mod list;
|
||||
impl<T: SessionStream> Session<T> {
|
||||
pub async fn handle_capa(&mut self) -> trc::Result<()> {
|
||||
let mechanisms = if self.stream.is_tls() || self.server.core.imap.allow_plain_auth {
|
||||
vec![Mechanism::Plain, Mechanism::OAuthBearer]
|
||||
vec![Mechanism::Plain, Mechanism::OAuthBearer, Mechanism::XOauth2]
|
||||
} else {
|
||||
vec![Mechanism::OAuthBearer]
|
||||
vec![Mechanism::OAuthBearer, Mechanism::XOauth2]
|
||||
};
|
||||
|
||||
trc::event!(
|
||||
|
||||
Reference in New Issue
Block a user