809f820cd4
Commit 4cda61a1
added support for pre-authenticated logins in
oVirt environments. This feature prevents a user from having
to type their password twice (once to the oVirt management machine,
and then immediately again in the provisioned guest running gnome-shell).
That feature is currently oVirt specific, but a similar feature would
be useful in non-oVirt based virt farm environments.
Toward that end, this commit generalizes the various aspects of the
oVirt integration code, so that it can be reused in a subsequent
commit for adding single sign on support in vmware deployments, too.
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/1983
25 lines
507 B
JavaScript
25 lines
507 B
JavaScript
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
|
/* exported 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;
|
|
}
|
|
}
|