-
-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Session: do not use our own Camel.Sasl subclass (#681)
Use the right one already provided by Camel
- Loading branch information
Corentin Noël
authored
Sep 6, 2021
1 parent
49bc582
commit b9130a0
Showing
1 changed file
with
1 addition
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,12 +18,6 @@ | |
* Authored by: Corentin Noël <[email protected]> | ||
*/ | ||
|
||
public class Mail.Backend.SimpleSasl : Camel.Sasl { | ||
public SimpleSasl (string service_name, string mechanism, Camel.Service service) { | ||
Object (service_name: service_name, mechanism: mechanism, service: service); | ||
} | ||
} | ||
|
||
public class Mail.Backend.Session : Camel.Session { | ||
private static Session _session; | ||
public static unowned Session get_default () { | ||
|
@@ -116,7 +110,7 @@ public class Mail.Backend.Session : Camel.Session { | |
/* Some SASL mechanisms can attempt to authenticate without a | ||
* user password being provided (e.g. single-sign-on credentials), | ||
* but can fall back to a user password. Handle that case next. */ | ||
var sasl = new SimpleSasl (((Camel.Provider)service.provider).protocol, mechanism, service); | ||
var sasl = Camel.Sasl.for_service (((Camel.Provider)service.provider).protocol, mechanism, service); | ||
if (sasl != null) { | ||
try_empty_password = sasl.try_empty_password_sync (); | ||
} | ||
|