summaryrefslogtreecommitdiffstats
path: root/js/gdm/credentialManager.js
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--js/gdm/credentialManager.js24
1 files changed, 24 insertions, 0 deletions
diff --git a/js/gdm/credentialManager.js b/js/gdm/credentialManager.js
new file mode 100644
index 0000000..5c4bc7e
--- /dev/null
+++ b/js/gdm/credentialManager.js
@@ -0,0 +1,24 @@
+// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
+/* exported CredentialManager */
+
+var CredentialManager = class CredentialManager {
+ constructor(service) {
+ this._token = null;
+ this._service = service;
+ this._authenticatedSignalId = null;
+ }
+
+ get token() {
+ return this._token;
+ }
+
+ set token(t) {
+ this._token = t;
+ if (this._token)
+ this.emit('user-authenticated', this._token);
+ }
+
+ get service() {
+ return this._service;
+ }
+};