authPrompt: add support for auth without username
This commit introduces a new BeginRequestType enum which gets passed to the 'reset' signal to specify whether a username should be provided to the begin() method and changes the loginDialog to comply. Currently, the signal only ever gets emitted with AuthPrompt.BeginRequestType.PROVIDE_USERNAME but that will change in the future when providing smartcard support. https://bugzilla.gnome.org/show_bug.cgi?id=683437
This commit is contained in:
@ -31,6 +31,11 @@ const AuthPromptStatus = {
|
||||
VERIFICATION_SUCCEEDED: 3
|
||||
};
|
||||
|
||||
const BeginRequestType = {
|
||||
PROVIDE_USERNAME: 0,
|
||||
DONT_PROVIDE_USERNAME: 1
|
||||
};
|
||||
|
||||
const AuthPrompt = new Lang.Class({
|
||||
Name: 'AuthPrompt',
|
||||
|
||||
@ -431,7 +436,7 @@ const AuthPrompt = new Lang.Class({
|
||||
if (oldStatus == AuthPromptStatus.VERIFICATION_FAILED)
|
||||
this.emit('failed');
|
||||
|
||||
this.emit('reset');
|
||||
this.emit('reset', BeginRequestType.PROVIDE_USERNAME);
|
||||
},
|
||||
|
||||
addCharacter: function(unichar) {
|
||||
|
Reference in New Issue
Block a user