From afcec676c4b6dff934c8adbe4763f58a512d9c8f Mon Sep 17 00:00:00 2001 From: lovetox Date: Fri, 12 Feb 2021 21:01:58 +0100 Subject: Add setting for GSSAPI authentication --- gajim/common/client.py | 5 +++++ gajim/common/setting_values.py | 1 + gajim/gtk/accounts.py | 3 +++ 3 files changed, 9 insertions(+) diff --git a/gajim/common/client.py b/gajim/common/client.py index 58b682504..619f29358 100644 --- a/gajim/common/client.py +++ b/gajim/common/client.py @@ -167,6 +167,11 @@ class Client(ConnectionHandlers): # his password self.password = passwords.get_password(self._account) + gssapi = app.settings.get_account_setting(self._account, + 'enable_gssapi') + if gssapi: + self._client.set_mechs(['GSSAPI']) + anonymous = app.settings.get_account_setting(self._account, 'anonymous_auth') if anonymous: diff --git a/gajim/common/setting_values.py b/gajim/common/setting_values.py index 388f4da7a..e28dc1ec5 100644 --- a/gajim/common/setting_values.py +++ b/gajim/common/setting_values.py @@ -258,6 +258,7 @@ ACCOUNT_SETTINGS = { 'gc_send_marker_private_default': True, 'gc_send_marker_public_default': False, 'chat_history_max_age': -1, + 'enable_gssapi': False, }, 'contact': { diff --git a/gajim/gtk/accounts.py b/gajim/gtk/accounts.py index f817a5ca3..f59856c75 100644 --- a/gajim/gtk/accounts.py +++ b/gajim/gtk/accounts.py @@ -994,6 +994,9 @@ class LoginDialog(SettingsDialog): Setting(SettingKind.CHANGEPASSWORD, _('Change Password'), SettingType.DIALOG, callback=self.on_password_change, props={'dialog': None}), + + Setting(SettingKind.SWITCH, _('Use GSSAPI'), + SettingType.ACCOUNT_CONFIG, 'enable_gssapi'), ] SettingsDialog.__init__(self, parent, _('Login Settings'), -- cgit v1.2.3