-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdummy_lightdm.js
More file actions
58 lines (35 loc) · 819 Bytes
/
Copy pathdummy_lightdm.js
File metadata and controls
58 lines (35 loc) · 819 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/** This is a dummy lightdm class, used to test/demo the greeter theme */
auth_phase = 0; // this is supposed to be a static variable :/
class lightdm {
static authenticate(username) {
if (username) {
auth_phase = 2;
window.show_prompt("Password","password");
} else {
auth_phase = 1;
window.show_prompt("Login","text");
}
}
static respond(input) {
if (auth_phase == 1) {
auth_phase = 2;
window.show_prompt("Password","password");
} else if (auth_phase == 2) {
setTimeout(function() {
window.authentication_complete();
},2000);
}
}
static cancel_authentication() {
auth_phase = 0;
}
static start_session() {
// nothing to do
}
static get is_authenticated() {
return false;
}
static get in_authentication() {
return auth_phase != 0;
}
}