Skip to content
Snippets Groups Projects
Unverified Commit aa975d5e authored by Bekerle, Patrizio's avatar Bekerle, Patrizio :fire:
Browse files

Send set-property events in auth component (dbp/apps/signature#32)

parent e8489b91
No related branches found
No related tags found
No related merge requests found
Pipeline #15876 passed
......@@ -87,6 +87,7 @@ export class AuthKeycloak extends AdapterLitElement {
window.DBPPersonId = this.personId;
window.DBPPerson = this.person;
this.sendSetPropertyEvents();
this._setLoginStatus(LoginStatus.LOGGED_IN, tokenChanged || newPerson);
} else {
if (this._loginStatus === LoginStatus.LOGGED_IN) {
......@@ -106,6 +107,7 @@ export class AuthKeycloak extends AdapterLitElement {
window.DBPPersonId = this.personId;
window.DBPPerson = this.person;
this.sendSetPropertyEvents();
this._setLoginStatus(LoginStatus.LOGGED_OUT);
}
......@@ -141,6 +143,15 @@ export class AuthKeycloak extends AdapterLitElement {
this.dispatchEvent(this.keycloakDataUpdateEvent);
}
sendSetPropertyEvents() {
this.sendSetPropertyEvent('auth-subject', this.subject);
this.sendSetPropertyEvent('auth-token', this.token);
this.sendSetPropertyEvent('auth-token-parsed', this.tokenParsed);
this.sendSetPropertyEvent('user-full-name', this.name);
this.sendSetPropertyEvent('person-id', this.personId);
this.sendSetPropertyEvent('person', this.person);
}
_setLoginStatus(status, force) {
if (this._loginStatus === status && !force)
return;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment