Blame SOURCES/support-choicelist-extension.patch

1bd53d
From f821b65401284cc31f68f0eb1b2e71ae3a90a122 Mon Sep 17 00:00:00 2001
1bd53d
From: Ray Strode <rstrode@redhat.com>
1bd53d
Date: Tue, 18 Jul 2017 12:58:14 -0400
1bd53d
Subject: [PATCH 1/2] gdm: Add AuthList control
1bd53d
1bd53d
Ultimately, we want to add support for GDM's new ChoiceList
1bd53d
PAM extension.  That extension allows PAM modules to present
1bd53d
a list of choices to the user. Before we can support that
1bd53d
extension, however, we need to have a list control in the
1bd53d
login-screen/unlock screen.  This commit adds that control.
1bd53d
1bd53d
For the most part, it's a copy-and-paste of the gdm userlist,
1bd53d
but with less features.  It lacks API specific to the users,
1bd53d
lacks the built in timed login indicator, etc. It does feature
1bd53d
a label heading.
1bd53d
---
1bd53d
 .../widgets/_login-dialog.scss                |  26 +++
1bd53d
 js/gdm/authList.js                            | 176 ++++++++++++++++++
1bd53d
 js/js-resources.gresource.xml                 |   1 +
1bd53d
 3 files changed, 203 insertions(+)
1bd53d
 create mode 100644 js/gdm/authList.js
1bd53d
1bd53d
diff --git a/data/theme/gnome-shell-sass/widgets/_login-dialog.scss b/data/theme/gnome-shell-sass/widgets/_login-dialog.scss
1bd53d
index 84539342d..f68d5de99 100644
1bd53d
--- a/data/theme/gnome-shell-sass/widgets/_login-dialog.scss
1bd53d
+++ b/data/theme/gnome-shell-sass/widgets/_login-dialog.scss
1bd53d
@@ -86,60 +86,86 @@
1bd53d
   .caps-lock-warning-label,
1bd53d
   .login-dialog-message-warning {
1bd53d
     color: $osd_fg_color;
1bd53d
   }
1bd53d
 }
1bd53d
 
1bd53d
 .login-dialog-logo-bin { padding: 24px 0px; }
1bd53d
 .login-dialog-banner { color: darken($osd_fg_color,10%); }
1bd53d
 .login-dialog-button-box { width: 23em; spacing: 5px; }
1bd53d
 .login-dialog-message { text-align: center; }
1bd53d
 .login-dialog-message-hint, .login-dialog-message {
1bd53d
   color: darken($osd_fg_color, 20%);
1bd53d
   min-height: 2.75em;
1bd53d
 }
1bd53d
 .login-dialog-user-selection-box { padding: 100px 0px; }
1bd53d
 .login-dialog-not-listed-label {
1bd53d
   padding-left: 2px;
1bd53d
   .login-dialog-not-listed-button:focus &,
1bd53d
   .login-dialog-not-listed-button:hover & {
1bd53d
     color: $osd_fg_color;
1bd53d
   }
1bd53d
 }
1bd53d
 
1bd53d
 .login-dialog-not-listed-label {
1bd53d
   @include fontsize($base_font_size - 1);
1bd53d
   font-weight: bold;
1bd53d
   color: darken($osd_fg_color,30%);
1bd53d
   padding-top: 1em;
1bd53d
 }
1bd53d
 
1bd53d
+.login-dialog-auth-list-view { -st-vfade-offset: 1em; }
1bd53d
+.login-dialog-auth-list {
1bd53d
+  spacing: 6px;
1bd53d
+  margin-left: 2em;
1bd53d
+}
1bd53d
+
1bd53d
+.login-dialog-auth-list-title {
1bd53d
+  margin-left: 2em;
1bd53d
+}
1bd53d
+
1bd53d
+.login-dialog-auth-list-item {
1bd53d
+  border-radius: $base_border_radius + 4px;
1bd53d
+  padding: 6px;
1bd53d
+  color: darken($osd_fg_color,30%);
1bd53d
+  &:focus, &:selected { background-color: $selected_bg_color; color: $selected_fg_color; }
1bd53d
+}
1bd53d
+
1bd53d
+.login-dialog-auth-list-label {
1bd53d
+  @include fontsize($base_font_size + 2);
1bd53d
+  font-weight: bold;
1bd53d
+  padding-left: 15px;
1bd53d
+
1bd53d
+  &:ltr { padding-left: 14px; text-align: left; }
1bd53d
+  &:rtl { padding-right: 14px; text-align: right; }
1bd53d
+}
1bd53d
+
1bd53d
 .login-dialog-user-list-view { -st-vfade-offset: 1em; }
1bd53d
 .login-dialog-user-list {
1bd53d
   spacing: 12px;
1bd53d
   width: 23em;
1bd53d
   &:expanded .login-dialog-user-list-item:selected { background-color: $selected_bg_color; color: $selected_fg_color; }
1bd53d
   &:expanded .login-dialog-user-list-item:logged-in { border-right: 2px solid $selected_bg_color; }
1bd53d
 }
1bd53d
 
1bd53d
 .login-dialog-user-list-item {
1bd53d
   border-radius: $base_border_radius + 4px;
1bd53d
   padding: 6px;
1bd53d
   color: darken($osd_fg_color,30%);
1bd53d
   &:ltr .user-widget { padding-right: 1em; }
1bd53d
   &:rtl .user-widget { padding-left: 1em; }
1bd53d
   .login-dialog-timed-login-indicator {
1bd53d
     height: 2px;
1bd53d
     margin-top: 6px;
1bd53d
     background-color: $osd_fg_color;
1bd53d
   }
1bd53d
   &:focus .login-dialog-timed-login-indicator { background-color: $selected_fg_color; }
1bd53d
 }
1bd53d
 
1bd53d
 .user-widget-label {
1bd53d
   color: $osd_fg_color;
1bd53d
 }
1bd53d
 
1bd53d
 .user-widget.horizontal .user-widget-label {
1bd53d
   @include fontsize($base_font_size + 2);
1bd53d
   font-weight: bold;
1bd53d
   padding-left: 15px;
1bd53d
diff --git a/js/gdm/authList.js b/js/gdm/authList.js
1bd53d
new file mode 100644
1bd53d
index 000000000..fb223a972
1bd53d
--- /dev/null
1bd53d
+++ b/js/gdm/authList.js
1bd53d
@@ -0,0 +1,176 @@
1bd53d
+// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
1bd53d
+/*
1bd53d
+ * Copyright 2017 Red Hat, Inc
1bd53d
+ *
1bd53d
+ * This program is free software; you can redistribute it and/or modify
1bd53d
+ * it under the terms of the GNU General Public License as published by
1bd53d
+ * the Free Software Foundation; either version 2, or (at your option)
1bd53d
+ * any later version.
1bd53d
+ *
1bd53d
+ * This program is distributed in the hope that it will be useful,
1bd53d
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1bd53d
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1bd53d
+ * GNU General Public License for more details.
1bd53d
+ *
1bd53d
+ * You should have received a copy of the GNU General Public License
1bd53d
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
1bd53d
+ */
1bd53d
+/* exported AuthList */
1bd53d
+
1bd53d
+const { Clutter, GObject, Meta, St } = imports.gi;
1bd53d
+
1bd53d
+const SCROLL_ANIMATION_TIME = 500;
1bd53d
+
1bd53d
+const AuthListItem = GObject.registerClass({
1bd53d
+    Signals: { 'activate': {} },
1bd53d
+}, class AuthListItem extends St.Button {
1bd53d
+    _init(key, text) {
1bd53d
+        this.key = key;
1bd53d
+        const label = new St.Label({
1bd53d
+            text,
1bd53d
+            style_class: 'login-dialog-auth-list-label',
1bd53d
+            y_align: Clutter.ActorAlign.CENTER,
1bd53d
+            x_expand: false,
1bd53d
+        });
1bd53d
+
1bd53d
+        super._init({
1bd53d
+            style_class: 'login-dialog-auth-list-item',
1bd53d
+            button_mask: St.ButtonMask.ONE | St.ButtonMask.THREE,
1bd53d
+            can_focus: true,
1bd53d
+            child: label,
1bd53d
+            reactive: true,
1bd53d
+        });
1bd53d
+
1bd53d
+        this.connect('key-focus-in',
1bd53d
+            () => this._setSelected(true));
1bd53d
+        this.connect('key-focus-out',
1bd53d
+            () => this._setSelected(false));
1bd53d
+        this.connect('notify::hover',
1bd53d
+            () => this._setSelected(this.hover));
1bd53d
+
1bd53d
+        this.connect('clicked', this._onClicked.bind(this));
1bd53d
+    }
1bd53d
+
1bd53d
+    _onClicked() {
1bd53d
+        this.emit('activate');
1bd53d
+    }
1bd53d
+
1bd53d
+    _setSelected(selected) {
1bd53d
+        if (selected) {
1bd53d
+            this.add_style_pseudo_class('selected');
1bd53d
+            this.grab_key_focus();
1bd53d
+        } else {
1bd53d
+            this.remove_style_pseudo_class('selected');
1bd53d
+        }
1bd53d
+    }
1bd53d
+});
1bd53d
+
1bd53d
+var AuthList = GObject.registerClass({
1bd53d
+    Signals: {
1bd53d
+        'activate': { param_types: [GObject.TYPE_STRING] },
1bd53d
+        'item-added': { param_types: [AuthListItem.$gtype] },
1bd53d
+    },
1bd53d
+}, class AuthList extends St.BoxLayout {
1bd53d
+    _init() {
1bd53d
+        super._init({
1bd53d
+            vertical: true,
1bd53d
+            style_class: 'login-dialog-auth-list-layout',
1bd53d
+            x_align: Clutter.ActorAlign.START,
1bd53d
+            y_align: Clutter.ActorAlign.CENTER,
1bd53d
+        });
1bd53d
+
1bd53d
+        this.label = new St.Label({ style_class: 'login-dialog-auth-list-title' });
1bd53d
+        this.add_child(this.label);
1bd53d
+
1bd53d
+        this._scrollView = new St.ScrollView({
1bd53d
+            style_class: 'login-dialog-auth-list-view',
1bd53d
+        });
1bd53d
+        this._scrollView.set_policy(
1bd53d
+            St.PolicyType.NEVER, St.PolicyType.AUTOMATIC);
1bd53d
+        this.add_child(this._scrollView);
1bd53d
+
1bd53d
+        this._box = new St.BoxLayout({
1bd53d
+            vertical: true,
1bd53d
+            style_class: 'login-dialog-auth-list',
1bd53d
+            pseudo_class: 'expanded',
1bd53d
+        });
1bd53d
+
1bd53d
+        this._scrollView.add_actor(this._box);
1bd53d
+        this._items = new Map();
1bd53d
+
1bd53d
+        this.connect('key-focus-in', this._moveFocusToItems.bind(this));
1bd53d
+    }
1bd53d
+
1bd53d
+    _moveFocusToItems() {
1bd53d
+        let hasItems = this.numItems > 0;
1bd53d
+
1bd53d
+        if (!hasItems)
1bd53d
+            return;
1bd53d
+
1bd53d
+        if (global.stage.get_key_focus() !== this)
1bd53d
+            return;
1bd53d
+
1bd53d
+        let focusSet = this.navigate_focus(null, St.DirectionType.TAB_FORWARD, false);
1bd53d
+        if (!focusSet) {
1bd53d
+            Meta.later_add(Meta.LaterType.BEFORE_REDRAW, () => {
1bd53d
+                this._moveFocusToItems();
1bd53d
+                return false;
1bd53d
+            });
1bd53d
+        }
1bd53d
+    }
1bd53d
+
1bd53d
+    _onItemActivated(activatedItem) {
1bd53d
+        this.emit('activate', activatedItem.key);
1bd53d
+    }
1bd53d
+
1bd53d
+    scrollToItem(item) {
1bd53d
+        let box = item.get_allocation_box();
1bd53d
+
1bd53d
+        let adjustment = this._scrollView.get_vscroll_bar().get_adjustment();
1bd53d
+
1bd53d
+        let value = (box.y1 + adjustment.step_increment / 2.0) - (adjustment.page_size / 2.0);
1bd53d
+        adjustment.ease(value, {
1bd53d
+            duration: SCROLL_ANIMATION_TIME,
1bd53d
+            mode: Clutter.AnimationMode.EASE_OUT_QUAD,
1bd53d
+        });
1bd53d
+    }
1bd53d
+
1bd53d
+    addItem(key, text) {
1bd53d
+        this.removeItem(key);
1bd53d
+
1bd53d
+        let item = new AuthListItem(key, text);
1bd53d
+        this._box.add(item);
1bd53d
+
1bd53d
+        this._items.set(key, item);
1bd53d
+
1bd53d
+        item.connect('activate', this._onItemActivated.bind(this));
1bd53d
+
1bd53d
+        // Try to keep the focused item front-and-center
1bd53d
+        item.connect('key-focus-in', () => this.scrollToItem(item));
1bd53d
+
1bd53d
+        this._moveFocusToItems();
1bd53d
+
1bd53d
+        this.emit('item-added', item);
1bd53d
+    }
1bd53d
+
1bd53d
+    removeItem(key) {
1bd53d
+        if (!this._items.has(key))
1bd53d
+            return;
1bd53d
+
1bd53d
+        let item = this._items.get(key);
1bd53d
+
1bd53d
+        item.destroy();
1bd53d
+
1bd53d
+        this._items.delete(key);
1bd53d
+    }
1bd53d
+
1bd53d
+    get numItems() {
1bd53d
+        return this._items.size;
1bd53d
+    }
1bd53d
+
1bd53d
+    clear() {
1bd53d
+        this.label.text = '';
1bd53d
+        this._box.destroy_all_children();
1bd53d
+        this._items.clear();
1bd53d
+    }
1bd53d
+});
1bd53d
diff --git a/js/js-resources.gresource.xml b/js/js-resources.gresource.xml
1bd53d
index e65e0e9cf..b2c603a55 100644
1bd53d
--- a/js/js-resources.gresource.xml
1bd53d
+++ b/js/js-resources.gresource.xml
1bd53d
@@ -1,33 +1,34 @@
1bd53d
 
1bd53d
 <gresources>
1bd53d
   <gresource prefix="/org/gnome/shell">
1bd53d
+    <file>gdm/authList.js</file>
1bd53d
     <file>gdm/authPrompt.js</file>
1bd53d
     <file>gdm/batch.js</file>
1bd53d
     <file>gdm/loginDialog.js</file>
1bd53d
     <file>gdm/oVirt.js</file>
1bd53d
     <file>gdm/credentialManager.js</file>
1bd53d
     <file>gdm/vmware.js</file>
1bd53d
     <file>gdm/realmd.js</file>
1bd53d
     <file>gdm/util.js</file>
1bd53d
 
1bd53d
     <file>misc/config.js</file>
1bd53d
     <file>misc/extensionUtils.js</file>
1bd53d
     <file>misc/fileUtils.js</file>
1bd53d
     <file>misc/gnomeSession.js</file>
1bd53d
     <file>misc/history.js</file>
1bd53d
     <file>misc/ibusManager.js</file>
1bd53d
     <file>misc/inputMethod.js</file>
1bd53d
     <file>misc/introspect.js</file>
1bd53d
     <file>misc/jsParse.js</file>
1bd53d
     <file>misc/keyboardManager.js</file>
1bd53d
     <file>misc/loginManager.js</file>
1bd53d
     <file>misc/modemManager.js</file>
1bd53d
     <file>misc/objectManager.js</file>
1bd53d
     <file>misc/params.js</file>
1bd53d
     <file>misc/parentalControlsManager.js</file>
1bd53d
     <file>misc/permissionStore.js</file>
1bd53d
     <file>misc/smartcardManager.js</file>
1bd53d
     <file>misc/systemActions.js</file>
1bd53d
     <file>misc/util.js</file>
1bd53d
     <file>misc/weather.js</file>
1bd53d
 
1bd53d
-- 
1bd53d
2.34.1
1bd53d
1bd53d
From 5a2fda2fe2526f81c4dbbee6512182f19fc76a74 Mon Sep 17 00:00:00 2001
1bd53d
From: Ray Strode <rstrode@redhat.com>
1bd53d
Date: Mon, 17 Jul 2017 16:48:03 -0400
1bd53d
Subject: [PATCH 2/2] gdmUtil: Enable support for GDM's ChoiceList PAM
1bd53d
 extension
1bd53d
1bd53d
This commit hooks up support for GDM's ChoiceList PAM extension.
1bd53d
---
1bd53d
 js/gdm/authPrompt.js  | 71 +++++++++++++++++++++++++++++++++++++++++--
1bd53d
 js/gdm/loginDialog.js |  5 +++
1bd53d
 js/gdm/util.js        | 28 +++++++++++++++++
1bd53d
 js/ui/unlockDialog.js |  7 +++++
1bd53d
 4 files changed, 109 insertions(+), 2 deletions(-)
1bd53d
1bd53d
diff --git a/js/gdm/authPrompt.js b/js/gdm/authPrompt.js
1bd53d
index 84c608b2f..4da91e096 100644
1bd53d
--- a/js/gdm/authPrompt.js
1bd53d
+++ b/js/gdm/authPrompt.js
1bd53d
@@ -1,36 +1,37 @@
1bd53d
 // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
1bd53d
 /* exported AuthPrompt */
1bd53d
 
1bd53d
 const { Clutter, GLib, GObject, Meta, Pango, Shell, St } = imports.gi;
1bd53d
 
1bd53d
 const Animation = imports.ui.animation;
1bd53d
+const AuthList = imports.gdm.authList;
1bd53d
 const Batch = imports.gdm.batch;
1bd53d
 const GdmUtil = imports.gdm.util;
1bd53d
 const OVirt = imports.gdm.oVirt;
1bd53d
 const Vmware = imports.gdm.vmware;
1bd53d
 const Params = imports.misc.params;
1bd53d
 const ShellEntry = imports.ui.shellEntry;
1bd53d
 const UserWidget = imports.ui.userWidget;
1bd53d
 const Util = imports.misc.util;
1bd53d
 
1bd53d
 var DEFAULT_BUTTON_WELL_ICON_SIZE = 16;
1bd53d
 var DEFAULT_BUTTON_WELL_ANIMATION_DELAY = 1000;
1bd53d
 var DEFAULT_BUTTON_WELL_ANIMATION_TIME = 300;
1bd53d
 
1bd53d
 var MESSAGE_FADE_OUT_ANIMATION_TIME = 500;
1bd53d
 
1bd53d
 var AuthPromptMode = {
1bd53d
     UNLOCK_ONLY: 0,
1bd53d
     UNLOCK_OR_LOG_IN: 1,
1bd53d
 };
1bd53d
 
1bd53d
 var AuthPromptStatus = {
1bd53d
     NOT_VERIFYING: 0,
1bd53d
     VERIFYING: 1,
1bd53d
     VERIFICATION_FAILED: 2,
1bd53d
     VERIFICATION_SUCCEEDED: 3,
1bd53d
     VERIFICATION_CANCELLED: 4,
1bd53d
     VERIFICATION_IN_PROGRESS: 5,
1bd53d
 };
1bd53d
 
1bd53d
 var BeginRequestType = {
1bd53d
@@ -48,144 +49,164 @@ var AuthPrompt = GObject.registerClass({
1bd53d
         'reset': { param_types: [GObject.TYPE_UINT] },
1bd53d
     },
1bd53d
 }, class AuthPrompt extends St.BoxLayout {
1bd53d
     _init(gdmClient, mode) {
1bd53d
         super._init({
1bd53d
             style_class: 'login-dialog-prompt-layout',
1bd53d
             vertical: true,
1bd53d
             x_expand: true,
1bd53d
             x_align: Clutter.ActorAlign.CENTER,
1bd53d
         });
1bd53d
 
1bd53d
         this.verificationStatus = AuthPromptStatus.NOT_VERIFYING;
1bd53d
 
1bd53d
         this._gdmClient = gdmClient;
1bd53d
         this._mode = mode;
1bd53d
         this._defaultButtonWellActor = null;
1bd53d
         this._cancelledRetries = 0;
1bd53d
 
1bd53d
         this._idleMonitor = Meta.IdleMonitor.get_core();
1bd53d
 
1bd53d
         let reauthenticationOnly;
1bd53d
         if (this._mode == AuthPromptMode.UNLOCK_ONLY)
1bd53d
             reauthenticationOnly = true;
1bd53d
         else if (this._mode == AuthPromptMode.UNLOCK_OR_LOG_IN)
1bd53d
             reauthenticationOnly = false;
1bd53d
 
1bd53d
         this._userVerifier = new GdmUtil.ShellUserVerifier(this._gdmClient, { reauthenticationOnly });
1bd53d
 
1bd53d
         this._userVerifier.connect('ask-question', this._onAskQuestion.bind(this));
1bd53d
         this._userVerifier.connect('show-message', this._onShowMessage.bind(this));
1bd53d
+        this._userVerifier.connect('show-choice-list', this._onShowChoiceList.bind(this));
1bd53d
         this._userVerifier.connect('verification-failed', this._onVerificationFailed.bind(this));
1bd53d
         this._userVerifier.connect('verification-complete', this._onVerificationComplete.bind(this));
1bd53d
         this._userVerifier.connect('reset', this._onReset.bind(this));
1bd53d
         this._userVerifier.connect('smartcard-status-changed', this._onSmartcardStatusChanged.bind(this));
1bd53d
         this._userVerifier.connect('credential-manager-authenticated', this._onCredentialManagerAuthenticated.bind(this));
1bd53d
         this.smartcardDetected = this._userVerifier.smartcardDetected;
1bd53d
 
1bd53d
         this.connect('destroy', this._onDestroy.bind(this));
1bd53d
 
1bd53d
         this._userWell = new St.Bin({
1bd53d
             x_expand: true,
1bd53d
             y_expand: true,
1bd53d
         });
1bd53d
         this.add_child(this._userWell);
1bd53d
 
1bd53d
         this._hasCancelButton = this._mode === AuthPromptMode.UNLOCK_OR_LOG_IN;
1bd53d
 
1bd53d
-        this._initEntryRow();
1bd53d
+        this._initInputRow();
1bd53d
 
1bd53d
         let capsLockPlaceholder = new St.Label();
1bd53d
         this.add_child(capsLockPlaceholder);
1bd53d
 
1bd53d
         this._capsLockWarningLabel = new ShellEntry.CapsLockWarning({
1bd53d
             x_expand: true,
1bd53d
             x_align: Clutter.ActorAlign.CENTER,
1bd53d
         });
1bd53d
         this.add_child(this._capsLockWarningLabel);
1bd53d
 
1bd53d
         this._capsLockWarningLabel.bind_property('visible',
1bd53d
             capsLockPlaceholder, 'visible',
1bd53d
             GObject.BindingFlags.SYNC_CREATE | GObject.BindingFlags.INVERT_BOOLEAN);
1bd53d
 
1bd53d
         this._message = new St.Label({
1bd53d
             opacity: 0,
1bd53d
             styleClass: 'login-dialog-message',
1bd53d
             y_expand: true,
1bd53d
             x_expand: true,
1bd53d
             y_align: Clutter.ActorAlign.START,
1bd53d
             x_align: Clutter.ActorAlign.CENTER,
1bd53d
         });
1bd53d
         this._message.clutter_text.line_wrap = true;
1bd53d
         this._message.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
1bd53d
         this.add_child(this._message);
1bd53d
     }
1bd53d
 
1bd53d
     _onDestroy() {
1bd53d
         if (this._preemptiveAnswerWatchId) {
1bd53d
             this._idleMonitor.remove_watch(this._preemptiveAnswerWatchId);
1bd53d
             this._preemptiveAnswerWatchId = 0;
1bd53d
         }
1bd53d
 
1bd53d
         this._userVerifier.destroy();
1bd53d
         this._userVerifier = null;
1bd53d
     }
1bd53d
 
1bd53d
     vfunc_key_press_event(keyPressEvent) {
1bd53d
         if (keyPressEvent.keyval == Clutter.KEY_Escape)
1bd53d
             this.cancel();
1bd53d
         return super.vfunc_key_press_event(keyPressEvent);
1bd53d
     }
1bd53d
 
1bd53d
-    _initEntryRow() {
1bd53d
+    _initInputRow() {
1bd53d
         this._mainBox = new St.BoxLayout({
1bd53d
             style_class: 'login-dialog-button-box',
1bd53d
             vertical: false,
1bd53d
         });
1bd53d
         this.add_child(this._mainBox);
1bd53d
 
1bd53d
         this.cancelButton = new St.Button({
1bd53d
             style_class: 'modal-dialog-button button cancel-button',
1bd53d
             accessible_name: _('Cancel'),
1bd53d
             button_mask: St.ButtonMask.ONE | St.ButtonMask.THREE,
1bd53d
             reactive: this._hasCancelButton,
1bd53d
             can_focus: this._hasCancelButton,
1bd53d
             x_align: Clutter.ActorAlign.START,
1bd53d
             y_align: Clutter.ActorAlign.CENTER,
1bd53d
             child: new St.Icon({ icon_name: 'go-previous-symbolic' }),
1bd53d
         });
1bd53d
         if (this._hasCancelButton)
1bd53d
             this.cancelButton.connect('clicked', () => this.cancel());
1bd53d
         else
1bd53d
             this.cancelButton.opacity = 0;
1bd53d
         this._mainBox.add_child(this.cancelButton);
1bd53d
 
1bd53d
+        this._authList = new AuthList.AuthList();
1bd53d
+        this._authList.set({
1bd53d
+            visible: false,
1bd53d
+        });
1bd53d
+        this._authList.connect('activate', (list, key) => {
1bd53d
+            this._authList.reactive = false;
1bd53d
+            this._authList.ease({
1bd53d
+                opacity: 0,
1bd53d
+                duration: MESSAGE_FADE_OUT_ANIMATION_TIME,
1bd53d
+                mode: Clutter.AnimationMode.EASE_OUT_QUAD,
1bd53d
+                onComplete: () => {
1bd53d
+                    this._authList.clear();
1bd53d
+                    this._authList.hide();
1bd53d
+                    this._userVerifier.selectChoice(this._queryingService, key);
1bd53d
+                },
1bd53d
+            });
1bd53d
+        });
1bd53d
+        this._mainBox.add_child(this._authList);
1bd53d
+
1bd53d
         let entryParams = {
1bd53d
             style_class: 'login-dialog-prompt-entry',
1bd53d
             can_focus: true,
1bd53d
             x_expand: true,
1bd53d
         };
1bd53d
 
1bd53d
         this._entry = null;
1bd53d
 
1bd53d
         this._textEntry = new St.Entry(entryParams);
1bd53d
         ShellEntry.addContextMenu(this._textEntry, { actionMode: Shell.ActionMode.NONE });
1bd53d
 
1bd53d
         this._passwordEntry = new St.PasswordEntry(entryParams);
1bd53d
         ShellEntry.addContextMenu(this._passwordEntry, { actionMode: Shell.ActionMode.NONE });
1bd53d
 
1bd53d
         this._entry = this._passwordEntry;
1bd53d
         this._mainBox.add_child(this._entry);
1bd53d
         this._entry.grab_key_focus();
1bd53d
 
1bd53d
         this._timedLoginIndicator = new St.Bin({
1bd53d
             style_class: 'login-dialog-timed-login-indicator',
1bd53d
             scale_x: 0,
1bd53d
         });
1bd53d
 
1bd53d
         this.add_child(this._timedLoginIndicator);
1bd53d
 
1bd53d
         [this._textEntry, this._passwordEntry].forEach(entry => {
1bd53d
             entry.clutter_text.connect('text-changed', () => {
1bd53d
                 if (!this._userVerifier.hasPendingMessages && this._queryingService && !this._preemptiveAnswer)
1bd53d
                     this._fadeOutMessage();
1bd53d
             });
1bd53d
@@ -276,60 +297,74 @@ var AuthPrompt = GObject.registerClass({
1bd53d
             this._entry = this._textEntry;
1bd53d
         }
1bd53d
         this._capsLockWarningLabel.visible = secret;
1bd53d
     }
1bd53d
 
1bd53d
     _onAskQuestion(verifier, serviceName, question, secret) {
1bd53d
         if (this._queryingService)
1bd53d
             this.clear();
1bd53d
 
1bd53d
         this._queryingService = serviceName;
1bd53d
         if (this._preemptiveAnswer) {
1bd53d
             this._userVerifier.answerQuery(this._queryingService, this._preemptiveAnswer);
1bd53d
             this._preemptiveAnswer = null;
1bd53d
             return;
1bd53d
         }
1bd53d
 
1bd53d
         this._updateEntry(secret);
1bd53d
 
1bd53d
         // Hack: The question string comes directly from PAM, if it's "Password:"
1bd53d
         // we replace it with our own to allow localization, if it's something
1bd53d
         // else we remove the last colon and any trailing or leading spaces.
1bd53d
         if (question === 'Password:' || question === 'Password: ')
1bd53d
             this.setQuestion(_('Password'));
1bd53d
         else
1bd53d
             this.setQuestion(question.replace(/: *$/, '').trim());
1bd53d
 
1bd53d
         this.updateSensitivity(true);
1bd53d
         this.emit('prompted');
1bd53d
     }
1bd53d
 
1bd53d
+    _onShowChoiceList(userVerifier, serviceName, promptMessage, choiceList) {
1bd53d
+        if (this._queryingService)
1bd53d
+            this.clear();
1bd53d
+
1bd53d
+        this._queryingService = serviceName;
1bd53d
+
1bd53d
+        if (this._preemptiveAnswer)
1bd53d
+            this._preemptiveAnswer = null;
1bd53d
+
1bd53d
+        this.setChoiceList(promptMessage, choiceList);
1bd53d
+        this.updateSensitivity(true);
1bd53d
+        this.emit('prompted');
1bd53d
+    }
1bd53d
+
1bd53d
     _onCredentialManagerAuthenticated() {
1bd53d
         if (this.verificationStatus != AuthPromptStatus.VERIFICATION_SUCCEEDED)
1bd53d
             this.reset();
1bd53d
     }
1bd53d
 
1bd53d
     _onSmartcardStatusChanged() {
1bd53d
         this.smartcardDetected = this._userVerifier.smartcardDetected;
1bd53d
 
1bd53d
         // Most of the time we want to reset if the user inserts or removes
1bd53d
         // a smartcard. Smartcard insertion "preempts" what the user was
1bd53d
         // doing, and smartcard removal aborts the preemption.
1bd53d
         // The exceptions are: 1) Don't reset on smartcard insertion if we're already verifying
1bd53d
         //                        with a smartcard
1bd53d
         //                     2) Don't reset if we've already succeeded at verification and
1bd53d
         //                        the user is getting logged in.
1bd53d
         if (this._userVerifier.serviceIsDefault(GdmUtil.SMARTCARD_SERVICE_NAME) &&
1bd53d
             this.verificationStatus == AuthPromptStatus.VERIFYING &&
1bd53d
             this.smartcardDetected)
1bd53d
             return;
1bd53d
 
1bd53d
         if (this.verificationStatus != AuthPromptStatus.VERIFICATION_SUCCEEDED)
1bd53d
             this.reset();
1bd53d
     }
1bd53d
 
1bd53d
     _onShowMessage(_userVerifier, serviceName, message, type) {
1bd53d
         this.setMessage(serviceName, message, type);
1bd53d
         this.emit('prompted');
1bd53d
     }
1bd53d
 
1bd53d
     _onVerificationFailed(userVerifier, serviceName, canRetry) {
1bd53d
@@ -411,109 +446,141 @@ var AuthPrompt = GObject.registerClass({
1bd53d
         if (actor) {
1bd53d
             if (isSpinner)
1bd53d
                 this._spinner.play();
1bd53d
 
1bd53d
             if (!animate) {
1bd53d
                 actor.opacity = 255;
1bd53d
             } else {
1bd53d
                 actor.ease({
1bd53d
                     opacity: 255,
1bd53d
                     duration: DEFAULT_BUTTON_WELL_ANIMATION_TIME,
1bd53d
                     delay: DEFAULT_BUTTON_WELL_ANIMATION_DELAY,
1bd53d
                     mode: Clutter.AnimationMode.LINEAR,
1bd53d
                 });
1bd53d
             }
1bd53d
         }
1bd53d
 
1bd53d
         this._defaultButtonWellActor = actor;
1bd53d
     }
1bd53d
 
1bd53d
     startSpinning() {
1bd53d
         this.setActorInDefaultButtonWell(this._spinner, true);
1bd53d
     }
1bd53d
 
1bd53d
     stopSpinning() {
1bd53d
         this.setActorInDefaultButtonWell(null, false);
1bd53d
     }
1bd53d
 
1bd53d
     clear() {
1bd53d
         this._entry.text = '';
1bd53d
         this.stopSpinning();
1bd53d
+        this._authList.clear();
1bd53d
+        this._authList.hide();
1bd53d
     }
1bd53d
 
1bd53d
     setQuestion(question) {
1bd53d
         if (this._preemptiveAnswerWatchId) {
1bd53d
             this._idleMonitor.remove_watch(this._preemptiveAnswerWatchId);
1bd53d
             this._preemptiveAnswerWatchId = 0;
1bd53d
         }
1bd53d
 
1bd53d
         this._entry.hint_text = question;
1bd53d
 
1bd53d
+        this._authList.hide();
1bd53d
         this._entry.show();
1bd53d
         this._entry.grab_key_focus();
1bd53d
     }
1bd53d
 
1bd53d
+    _fadeInChoiceList() {
1bd53d
+        this._authList.set({
1bd53d
+            opacity: 0,
1bd53d
+            visible: true,
1bd53d
+            reactive: false,
1bd53d
+        });
1bd53d
+        this._authList.ease({
1bd53d
+            opacity: 255,
1bd53d
+            duration: MESSAGE_FADE_OUT_ANIMATION_TIME,
1bd53d
+            transition: Clutter.AnimationMode.EASE_OUT_QUAD,
1bd53d
+            onComplete: () => (this._authList.reactive = true),
1bd53d
+        });
1bd53d
+    }
1bd53d
+
1bd53d
+    setChoiceList(promptMessage, choiceList) {
1bd53d
+        this._authList.clear();
1bd53d
+        this._authList.label.text = promptMessage;
1bd53d
+        for (let key in choiceList) {
1bd53d
+            let text = choiceList[key];
1bd53d
+            this._authList.addItem(key, text);
1bd53d
+        }
1bd53d
+
1bd53d
+        this._entry.hide();
1bd53d
+        if (this._message.text === '')
1bd53d
+            this._message.hide();
1bd53d
+        this._fadeInChoiceList();
1bd53d
+    }
1bd53d
+
1bd53d
     getAnswer() {
1bd53d
         let text;
1bd53d
 
1bd53d
         if (this._preemptiveAnswer) {
1bd53d
             text = this._preemptiveAnswer;
1bd53d
             this._preemptiveAnswer = null;
1bd53d
         } else {
1bd53d
             text = this._entry.get_text();
1bd53d
         }
1bd53d
 
1bd53d
         return text;
1bd53d
     }
1bd53d
 
1bd53d
     _fadeOutMessage() {
1bd53d
         if (this._message.opacity == 0)
1bd53d
             return;
1bd53d
         this._message.remove_all_transitions();
1bd53d
         this._message.ease({
1bd53d
             opacity: 0,
1bd53d
             duration: MESSAGE_FADE_OUT_ANIMATION_TIME,
1bd53d
             mode: Clutter.AnimationMode.EASE_OUT_QUAD,
1bd53d
         });
1bd53d
     }
1bd53d
 
1bd53d
     setMessage(serviceName, message, type) {
1bd53d
         if (type == GdmUtil.MessageType.ERROR)
1bd53d
             this._message.add_style_class_name('login-dialog-message-warning');
1bd53d
         else
1bd53d
             this._message.remove_style_class_name('login-dialog-message-warning');
1bd53d
 
1bd53d
         if (type == GdmUtil.MessageType.HINT)
1bd53d
             this._message.add_style_class_name('login-dialog-message-hint');
1bd53d
         else
1bd53d
             this._message.remove_style_class_name('login-dialog-message-hint');
1bd53d
 
1bd53d
+        this._message.show();
1bd53d
         if (message) {
1bd53d
             this._message.remove_all_transitions();
1bd53d
             this._message.text = message;
1bd53d
             this._message.opacity = 255;
1bd53d
         } else {
1bd53d
             this._message.opacity = 0;
1bd53d
         }
1bd53d
 
1bd53d
         if (type === GdmUtil.MessageType.ERROR &&
1bd53d
             this._userVerifier.serviceIsFingerprint(serviceName)) {
1bd53d
             // TODO: Use Await for wiggle to be over before unfreezing the user verifier queue
1bd53d
             const wiggleParameters = {
1bd53d
                 duration: 65,
1bd53d
                 wiggleCount: 3,
1bd53d
             };
1bd53d
             this._userVerifier.increaseCurrentMessageTimeout(
1bd53d
                 wiggleParameters.duration * (wiggleParameters.wiggleCount + 2));
1bd53d
             Util.wiggle(this._message, wiggleParameters);
1bd53d
         }
1bd53d
     }
1bd53d
 
1bd53d
     updateSensitivity(sensitive) {
1bd53d
         if (this._entry.reactive === sensitive)
1bd53d
             return;
1bd53d
 
1bd53d
         this._entry.reactive = sensitive;
1bd53d
 
1bd53d
         if (sensitive) {
1bd53d
             this._entry.grab_key_focus();
1bd53d
         } else {
1bd53d
diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js
1bd53d
index d2a82b43d..41dd99646 100644
1bd53d
--- a/js/gdm/loginDialog.js
1bd53d
+++ b/js/gdm/loginDialog.js
1bd53d
@@ -391,60 +391,65 @@ var SessionMenuButton = GObject.registerClass({
1bd53d
             let item = new PopupMenu.PopupMenuItem(sessionName);
1bd53d
             this._menu.addMenuItem(item);
1bd53d
             this._items[id] = item;
1bd53d
 
1bd53d
             item.connect('activate', () => {
1bd53d
                 this.setActiveSession(id);
1bd53d
                 this.emit('session-activated', this._activeSessionId);
1bd53d
             });
1bd53d
         }
1bd53d
     }
1bd53d
 });
1bd53d
 
1bd53d
 var LoginDialog = GObject.registerClass({
1bd53d
     Signals: {
1bd53d
         'failed': {},
1bd53d
         'wake-up-screen': {},
1bd53d
     },
1bd53d
 }, class LoginDialog extends St.Widget {
1bd53d
     _init(parentActor) {
1bd53d
         super._init({ style_class: 'login-dialog', visible: false });
1bd53d
 
1bd53d
         this.get_accessible().set_role(Atk.Role.WINDOW);
1bd53d
 
1bd53d
         this.add_constraint(new Layout.MonitorConstraint({ primary: true }));
1bd53d
         this.connect('destroy', this._onDestroy.bind(this));
1bd53d
         parentActor.add_child(this);
1bd53d
 
1bd53d
         this._userManager = AccountsService.UserManager.get_default();
1bd53d
         this._gdmClient = new Gdm.Client();
1bd53d
 
1bd53d
+        try {
1bd53d
+            this._gdmClient.set_enabled_extensions([Gdm.UserVerifierChoiceList.interface_info().name]);
1bd53d
+        } catch (e) {
1bd53d
+        }
1bd53d
+
1bd53d
         this._settings = new Gio.Settings({ schema_id: GdmUtil.LOGIN_SCREEN_SCHEMA });
1bd53d
 
1bd53d
         this._settings.connect('changed::%s'.format(GdmUtil.BANNER_MESSAGE_KEY),
1bd53d
                                this._updateBanner.bind(this));
1bd53d
         this._settings.connect('changed::%s'.format(GdmUtil.BANNER_MESSAGE_TEXT_KEY),
1bd53d
                                this._updateBanner.bind(this));
1bd53d
         this._settings.connect('changed::%s'.format(GdmUtil.DISABLE_USER_LIST_KEY),
1bd53d
                                this._updateDisableUserList.bind(this));
1bd53d
         this._settings.connect('changed::%s'.format(GdmUtil.LOGO_KEY),
1bd53d
                                this._updateLogo.bind(this));
1bd53d
 
1bd53d
         this._textureCache = St.TextureCache.get_default();
1bd53d
         this._updateLogoTextureId = this._textureCache.connect('texture-file-changed',
1bd53d
                                                                this._updateLogoTexture.bind(this));
1bd53d
 
1bd53d
         this._userSelectionBox = new St.BoxLayout({ style_class: 'login-dialog-user-selection-box',
1bd53d
                                                     x_align: Clutter.ActorAlign.CENTER,
1bd53d
                                                     y_align: Clutter.ActorAlign.CENTER,
1bd53d
                                                     vertical: true,
1bd53d
                                                     visible: false });
1bd53d
         this.add_child(this._userSelectionBox);
1bd53d
 
1bd53d
         this._userList = new UserList();
1bd53d
         this._userSelectionBox.add_child(this._userList);
1bd53d
 
1bd53d
         this._authPrompt = new AuthPrompt.AuthPrompt(this._gdmClient, AuthPrompt.AuthPromptMode.UNLOCK_OR_LOG_IN);
1bd53d
         this._authPrompt.connect('prompted', this._onPrompted.bind(this));
1bd53d
         this._authPrompt.connect('reset', this._onReset.bind(this));
1bd53d
         this._authPrompt.hide();
1bd53d
         this.add_child(this._authPrompt);
1bd53d
diff --git a/js/gdm/util.js b/js/gdm/util.js
1bd53d
index e62114cb1..3f327400f 100644
1bd53d
--- a/js/gdm/util.js
1bd53d
+++ b/js/gdm/util.js
1bd53d
@@ -211,90 +211,98 @@ var ShellUserVerifier = class {
1bd53d
         this._cancellable = new Gio.Cancellable();
1bd53d
         this._hold = hold;
1bd53d
         this._userName = userName;
1bd53d
         this.reauthenticating = false;
1bd53d
 
1bd53d
         this._checkForFingerprintReader();
1bd53d
 
1bd53d
         // If possible, reauthenticate an already running session,
1bd53d
         // so any session specific credentials get updated appropriately
1bd53d
         if (userName)
1bd53d
             this._openReauthenticationChannel(userName);
1bd53d
         else
1bd53d
             this._getUserVerifier();
1bd53d
     }
1bd53d
 
1bd53d
     cancel() {
1bd53d
         if (this._cancellable)
1bd53d
             this._cancellable.cancel();
1bd53d
 
1bd53d
         if (this._userVerifier) {
1bd53d
             this._userVerifier.call_cancel_sync(null);
1bd53d
             this.clear();
1bd53d
         }
1bd53d
     }
1bd53d
 
1bd53d
     _clearUserVerifier() {
1bd53d
         if (this._userVerifier) {
1bd53d
             this._disconnectSignals();
1bd53d
             this._userVerifier.run_dispose();
1bd53d
             this._userVerifier = null;
1bd53d
+            if (this._userVerifierChoiceList) {
1bd53d
+                this._userVerifierChoiceList.run_dispose();
1bd53d
+                this._userVerifierChoiceList = null;
1bd53d
+            }
1bd53d
         }
1bd53d
     }
1bd53d
 
1bd53d
     clear() {
1bd53d
         if (this._cancellable) {
1bd53d
             this._cancellable.cancel();
1bd53d
             this._cancellable = null;
1bd53d
         }
1bd53d
 
1bd53d
         this._clearUserVerifier();
1bd53d
         this._clearMessageQueue();
1bd53d
     }
1bd53d
 
1bd53d
     destroy() {
1bd53d
         this.cancel();
1bd53d
 
1bd53d
         this._settings.run_dispose();
1bd53d
         this._settings = null;
1bd53d
 
1bd53d
         this._smartcardManager.disconnect(this._smartcardInsertedId);
1bd53d
         this._smartcardManager.disconnect(this._smartcardRemovedId);
1bd53d
         this._smartcardManager = null;
1bd53d
 
1bd53d
         for (let service in this._credentialManagers) {
1bd53d
             let credentialManager = this._credentialManagers[service];
1bd53d
             credentialManager.disconnect(credentialManager._authenticatedSignalId);
1bd53d
             credentialManager = null;
1bd53d
         }
1bd53d
     }
1bd53d
 
1bd53d
+    selectChoice(serviceName, key) {
1bd53d
+        this._userVerifierChoiceList.call_select_choice(serviceName, key, this._cancellable, null);
1bd53d
+    }
1bd53d
+
1bd53d
     answerQuery(serviceName, answer) {
1bd53d
         if (!this.hasPendingMessages) {
1bd53d
             this._userVerifier.call_answer_query(serviceName, answer, this._cancellable, null);
1bd53d
         } else {
1bd53d
             const cancellable = this._cancellable;
1bd53d
             let signalId = this.connect('no-more-messages', () => {
1bd53d
                 this.disconnect(signalId);
1bd53d
                 if (!cancellable.is_cancelled())
1bd53d
                     this._userVerifier.call_answer_query(serviceName, answer, cancellable, null);
1bd53d
             });
1bd53d
         }
1bd53d
     }
1bd53d
 
1bd53d
     _getIntervalForMessage(message) {
1bd53d
         if (!message)
1bd53d
             return 0;
1bd53d
 
1bd53d
         // We probably could be smarter here
1bd53d
         return message.length * USER_READ_TIME;
1bd53d
     }
1bd53d
 
1bd53d
     finishMessageQueue() {
1bd53d
         if (!this.hasPendingMessages)
1bd53d
             return;
1bd53d
 
1bd53d
         this._messageQueue = [];
1bd53d
 
1bd53d
         this.emit('no-more-messages');
1bd53d
     }
1bd53d
 
1bd53d
@@ -429,103 +437,116 @@ var ShellUserVerifier = class {
1bd53d
     _reportInitError(where, error, serviceName) {
1bd53d
         logError(error, where);
1bd53d
         this._hold.release();
1bd53d
 
1bd53d
         this._queueMessage(serviceName, _('Authentication error'), MessageType.ERROR);
1bd53d
         this._failCounter++;
1bd53d
         this._verificationFailed(serviceName, false);
1bd53d
     }
1bd53d
 
1bd53d
     async _openReauthenticationChannel(userName) {
1bd53d
         try {
1bd53d
             this._clearUserVerifier();
1bd53d
             this._userVerifier = await this._client.open_reauthentication_channel(
1bd53d
                 userName, this._cancellable);
1bd53d
         } catch (e) {
1bd53d
             if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED))
1bd53d
                 return;
1bd53d
             if (e.matches(Gio.DBusError, Gio.DBusError.ACCESS_DENIED) &&
1bd53d
                 !this._reauthOnly) {
1bd53d
                 // Gdm emits org.freedesktop.DBus.Error.AccessDenied when there
1bd53d
                 // is no session to reauthenticate. Fall back to performing
1bd53d
                 // verification from this login session
1bd53d
                 this._getUserVerifier();
1bd53d
                 return;
1bd53d
             }
1bd53d
 
1bd53d
             this._reportInitError('Failed to open reauthentication channel', e);
1bd53d
             return;
1bd53d
         }
1bd53d
 
1bd53d
+        if (this._client.get_user_verifier_choice_list)
1bd53d
+            this._userVerifierChoiceList = this._client.get_user_verifier_choice_list();
1bd53d
+        else
1bd53d
+            this._userVerifierChoiceList = null;
1bd53d
+
1bd53d
         this.reauthenticating = true;
1bd53d
         this._connectSignals();
1bd53d
         this._beginVerification();
1bd53d
         this._hold.release();
1bd53d
     }
1bd53d
 
1bd53d
     async _getUserVerifier() {
1bd53d
         try {
1bd53d
             this._clearUserVerifier();
1bd53d
             this._userVerifier =
1bd53d
                 await this._client.get_user_verifier(this._cancellable);
1bd53d
         } catch (e) {
1bd53d
             if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED))
1bd53d
                 return;
1bd53d
             this._reportInitError('Failed to obtain user verifier', e);
1bd53d
             return;
1bd53d
         }
1bd53d
 
1bd53d
+        if (this._client.get_user_verifier_choice_list)
1bd53d
+            this._userVerifierChoiceList = this._client.get_user_verifier_choice_list();
1bd53d
+        else
1bd53d
+            this._userVerifierChoiceList = null;
1bd53d
+
1bd53d
         this._connectSignals();
1bd53d
         this._beginVerification();
1bd53d
         this._hold.release();
1bd53d
     }
1bd53d
 
1bd53d
     _connectSignals() {
1bd53d
         this._disconnectSignals();
1bd53d
         this._signalIds = [];
1bd53d
 
1bd53d
         let id = this._userVerifier.connect('info', this._onInfo.bind(this));
1bd53d
         this._signalIds.push(id);
1bd53d
         id = this._userVerifier.connect('problem', this._onProblem.bind(this));
1bd53d
         this._signalIds.push(id);
1bd53d
         id = this._userVerifier.connect('info-query', this._onInfoQuery.bind(this));
1bd53d
         this._signalIds.push(id);
1bd53d
         id = this._userVerifier.connect('secret-info-query', this._onSecretInfoQuery.bind(this));
1bd53d
         this._signalIds.push(id);
1bd53d
         id = this._userVerifier.connect('conversation-stopped', this._onConversationStopped.bind(this));
1bd53d
         this._signalIds.push(id);
1bd53d
         id = this._userVerifier.connect('service-unavailable', this._onServiceUnavailable.bind(this));
1bd53d
         this._signalIds.push(id);
1bd53d
         id = this._userVerifier.connect('reset', this._onReset.bind(this));
1bd53d
         this._signalIds.push(id);
1bd53d
         id = this._userVerifier.connect('verification-complete', this._onVerificationComplete.bind(this));
1bd53d
         this._signalIds.push(id);
1bd53d
+
1bd53d
+        if (this._userVerifierChoiceList)
1bd53d
+            this._userVerifierChoiceList.connect('choice-query', this._onChoiceListQuery.bind(this));
1bd53d
     }
1bd53d
 
1bd53d
     _disconnectSignals() {
1bd53d
         if (!this._signalIds || !this._userVerifier)
1bd53d
             return;
1bd53d
 
1bd53d
         this._signalIds.forEach(s => this._userVerifier.disconnect(s));
1bd53d
         this._signalIds = [];
1bd53d
     }
1bd53d
 
1bd53d
     _getForegroundService() {
1bd53d
         if (this._preemptingService)
1bd53d
             return this._preemptingService;
1bd53d
 
1bd53d
         return this._defaultService;
1bd53d
     }
1bd53d
 
1bd53d
     serviceIsForeground(serviceName) {
1bd53d
         return serviceName == this._getForegroundService();
1bd53d
     }
1bd53d
 
1bd53d
     serviceIsDefault(serviceName) {
1bd53d
         return serviceName == this._defaultService;
1bd53d
     }
1bd53d
 
1bd53d
     serviceIsFingerprint(serviceName) {
1bd53d
         return this._fingerprintReaderType !== FingerprintReaderType.NONE &&
1bd53d
             serviceName === FINGERPRINT_SERVICE_NAME;
1bd53d
     }
1bd53d
 
1bd53d
@@ -554,60 +575,67 @@ var ShellUserVerifier = class {
1bd53d
             } else {
1bd53d
                 await this._userVerifier.call_begin_verification(
1bd53d
                     serviceName, this._cancellable);
1bd53d
             }
1bd53d
         } catch (e) {
1bd53d
             if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED))
1bd53d
                 return;
1bd53d
             if (!this.serviceIsForeground(serviceName)) {
1bd53d
                 logError(e, 'Failed to start %s for %s'.format(serviceName, this._userName));
1bd53d
                 this._hold.release();
1bd53d
                 return;
1bd53d
             }
1bd53d
             this._reportInitError(this._userName
1bd53d
                 ? 'Failed to start %s verification for user'.format(serviceName)
1bd53d
                 : 'Failed to start %s verification'.format(serviceName), e,
1bd53d
             serviceName);
1bd53d
             return;
1bd53d
         }
1bd53d
         this._hold.release();
1bd53d
     }
1bd53d
 
1bd53d
     _beginVerification() {
1bd53d
         this._startService(this._getForegroundService());
1bd53d
 
1bd53d
         if (this._userName &&
1bd53d
             this._fingerprintReaderType !== FingerprintReaderType.NONE &&
1bd53d
             !this.serviceIsForeground(FINGERPRINT_SERVICE_NAME))
1bd53d
             this._startService(FINGERPRINT_SERVICE_NAME);
1bd53d
     }
1bd53d
 
1bd53d
+    _onChoiceListQuery(client, serviceName, promptMessage, list) {
1bd53d
+        if (!this.serviceIsForeground(serviceName))
1bd53d
+            return;
1bd53d
+
1bd53d
+        this.emit('show-choice-list', serviceName, promptMessage, list.deep_unpack());
1bd53d
+    }
1bd53d
+
1bd53d
     _onInfo(client, serviceName, info) {
1bd53d
         if (this.serviceIsForeground(serviceName)) {
1bd53d
             this._queueMessage(serviceName, info, MessageType.INFO);
1bd53d
         } else if (this.serviceIsFingerprint(serviceName)) {
1bd53d
             // We don't show fingerprint messages directly since it's
1bd53d
             // not the main auth service. Instead we use the messages
1bd53d
             // as a cue to display our own message.
1bd53d
             if (this._fingerprintReaderType === FingerprintReaderType.SWIPE) {
1bd53d
                 // Translators: this message is shown below the password entry field
1bd53d
                 // to indicate the user can swipe their finger on the fingerprint reader
1bd53d
                 this._queueMessage(serviceName, _('(or swipe finger across reader)'),
1bd53d
                     MessageType.HINT);
1bd53d
             } else {
1bd53d
                 // Translators: this message is shown below the password entry field
1bd53d
                 // to indicate the user can place their finger on the fingerprint reader instead
1bd53d
                 this._queueMessage(serviceName, _('(or place finger on reader)'),
1bd53d
                     MessageType.HINT);
1bd53d
             }
1bd53d
         }
1bd53d
     }
1bd53d
 
1bd53d
     _onProblem(client, serviceName, problem) {
1bd53d
         const isFingerprint = this.serviceIsFingerprint(serviceName);
1bd53d
 
1bd53d
         if (!this.serviceIsForeground(serviceName) && !isFingerprint)
1bd53d
             return;
1bd53d
 
1bd53d
         this._queuePriorityMessage(serviceName, problem, MessageType.ERROR);
1bd53d
 
1bd53d
         if (isFingerprint) {
1bd53d
diff --git a/js/ui/unlockDialog.js b/js/ui/unlockDialog.js
1bd53d
index 5b55cb08a..f4655b25b 100644
1bd53d
--- a/js/ui/unlockDialog.js
1bd53d
+++ b/js/ui/unlockDialog.js
1bd53d
@@ -466,60 +466,67 @@ class UnlockDialogLayout extends Clutter.LayoutManager {
1bd53d
             else
1bd53d
                 actorBox.x1 = box.x2 - (natWidth * 2);
1bd53d
 
1bd53d
             actorBox.y1 = box.y2 - (natHeight * 2);
1bd53d
             actorBox.x2 = actorBox.x1 + natWidth;
1bd53d
             actorBox.y2 = actorBox.y1 + natHeight;
1bd53d
 
1bd53d
             this._switchUserButton.allocate(actorBox);
1bd53d
         }
1bd53d
     }
1bd53d
 });
1bd53d
 
1bd53d
 var UnlockDialog = GObject.registerClass({
1bd53d
     Signals: {
1bd53d
         'failed': {},
1bd53d
         'wake-up-screen': {},
1bd53d
     },
1bd53d
 }, class UnlockDialog extends St.Widget {
1bd53d
     _init(parentActor) {
1bd53d
         super._init({
1bd53d
             accessible_role: Atk.Role.WINDOW,
1bd53d
             style_class: 'unlock-dialog',
1bd53d
             visible: false,
1bd53d
             reactive: true,
1bd53d
         });
1bd53d
 
1bd53d
         parentActor.add_child(this);
1bd53d
 
1bd53d
         this._gdmClient = new Gdm.Client();
1bd53d
 
1bd53d
+        try {
1bd53d
+            this._gdmClient.set_enabled_extensions([
1bd53d
+                Gdm.UserVerifierChoiceList.interface_info().name,
1bd53d
+            ]);
1bd53d
+        } catch (e) {
1bd53d
+        }
1bd53d
+
1bd53d
         this._adjustment = new St.Adjustment({
1bd53d
             actor: this,
1bd53d
             lower: 0,
1bd53d
             upper: 2,
1bd53d
             page_size: 1,
1bd53d
             page_increment: 1,
1bd53d
         });
1bd53d
         this._adjustment.connect('notify::value', () => {
1bd53d
             this._setTransitionProgress(this._adjustment.value);
1bd53d
         });
1bd53d
 
1bd53d
         this._swipeTracker = new SwipeTracker.SwipeTracker(this,
1bd53d
             Clutter.Orientation.VERTICAL,
1bd53d
             Shell.ActionMode.UNLOCK_SCREEN);
1bd53d
         this._swipeTracker.connect('begin', this._swipeBegin.bind(this));
1bd53d
         this._swipeTracker.connect('update', this._swipeUpdate.bind(this));
1bd53d
         this._swipeTracker.connect('end', this._swipeEnd.bind(this));
1bd53d
 
1bd53d
         this.connect('scroll-event', (o, event) => {
1bd53d
             if (this._swipeTracker.canHandleScrollEvent(event))
1bd53d
                 return Clutter.EVENT_PROPAGATE;
1bd53d
 
1bd53d
             let direction = event.get_scroll_direction();
1bd53d
             if (direction === Clutter.ScrollDirection.UP)
1bd53d
                 this._showClock();
1bd53d
             else if (direction === Clutter.ScrollDirection.DOWN)
1bd53d
                 this._showPrompt();
1bd53d
             return Clutter.EVENT_STOP;
1bd53d
         });
1bd53d
 
1bd53d
-- 
1bd53d
2.34.1
1bd53d