Skip to content
Snippets Groups Projects
Commit be33b3cb authored by Reiter, Christoph's avatar Reiter, Christoph :snake:
Browse files

Remove unused DBPAuthTokenParsed

It was only used in the demo.
parent 0ddadc8f
No related branches found
No related tags found
No related merge requests found
Pipeline #16275 passed
...@@ -13,7 +13,6 @@ import {AdapterLitElement} from "@dbp-toolkit/provider/src/adapter-lit-element"; ...@@ -13,7 +13,6 @@ import {AdapterLitElement} from "@dbp-toolkit/provider/src/adapter-lit-element";
* Sets some global variables: * Sets some global variables:
* window.DBPAuthSubject: Keycloak username * window.DBPAuthSubject: Keycloak username
* window.DBPAuthToken: Keycloak token to send with your requests * window.DBPAuthToken: Keycloak token to send with your requests
* window.DBPAuthTokenParsed: Keycloak token content
* window.DBPUserFullName: Full name of the user * window.DBPUserFullName: Full name of the user
* window.DBPPersonId: Person identifier of the user * window.DBPPersonId: Person identifier of the user
* window.DBPPerson: Person json object of the user (optional, enable by setting the `load-person` attribute) * window.DBPPerson: Person json object of the user (optional, enable by setting the `load-person` attribute)
...@@ -25,7 +24,6 @@ export class AuthKeycloak extends AdapterLitElement { ...@@ -25,7 +24,6 @@ export class AuthKeycloak extends AdapterLitElement {
this.forceLogin = false; this.forceLogin = false;
this.loadPerson = false; this.loadPerson = false;
this.token = ""; this.token = "";
this.tokenParsed = null;
this.subject = ""; this.subject = "";
this.name = ""; this.name = "";
this.personId = ""; this.personId = "";
...@@ -61,7 +59,6 @@ export class AuthKeycloak extends AdapterLitElement { ...@@ -61,7 +59,6 @@ export class AuthKeycloak extends AdapterLitElement {
if (kc.authenticated) { if (kc.authenticated) {
let tokenChanged = (this.token !== kc.token); let tokenChanged = (this.token !== kc.token);
this.tokenParsed = kc.tokenParsed;
this.name = kc.idTokenParsed.name; this.name = kc.idTokenParsed.name;
this.token = kc.token; this.token = kc.token;
...@@ -75,7 +72,6 @@ export class AuthKeycloak extends AdapterLitElement { ...@@ -75,7 +72,6 @@ export class AuthKeycloak extends AdapterLitElement {
window.DBPAuthSubject = this.subject; window.DBPAuthSubject = this.subject;
window.DBPAuthToken = this.token; window.DBPAuthToken = this.token;
window.DBPAuthTokenParsed = this.tokenParsed;
window.DBPUserFullName = this.name; window.DBPUserFullName = this.name;
window.DBPPersonId = this.personId; window.DBPPersonId = this.personId;
window.DBPPerson = this.person; window.DBPPerson = this.person;
...@@ -88,14 +84,12 @@ export class AuthKeycloak extends AdapterLitElement { ...@@ -88,14 +84,12 @@ export class AuthKeycloak extends AdapterLitElement {
} }
this.name = ""; this.name = "";
this.token = ""; this.token = "";
this.tokenParsed = null;
this.subject = ""; this.subject = "";
this.personId = ""; this.personId = "";
this.person = null; this.person = null;
window.DBPAuthSubject = this.subject; window.DBPAuthSubject = this.subject;
window.DBPAuthToken = this.token; window.DBPAuthToken = this.token;
window.DBPAuthTokenParsed = this.tokenParsed;
window.DBPUserFullName = this.name; window.DBPUserFullName = this.name;
window.DBPPersonId = this.personId; window.DBPPersonId = this.personId;
window.DBPPerson = this.person; window.DBPPerson = this.person;
...@@ -132,7 +126,6 @@ export class AuthKeycloak extends AdapterLitElement { ...@@ -132,7 +126,6 @@ export class AuthKeycloak extends AdapterLitElement {
sendSetPropertyEvents() { sendSetPropertyEvents() {
this.sendSetPropertyEvent('auth-subject', this.subject); this.sendSetPropertyEvent('auth-subject', this.subject);
this.sendSetPropertyEvent('auth-token', this.token); this.sendSetPropertyEvent('auth-token', this.token);
this.sendSetPropertyEvent('auth-token-parsed', this.tokenParsed);
this.sendSetPropertyEvent('user-full-name', this.name); this.sendSetPropertyEvent('user-full-name', this.name);
this.sendSetPropertyEvent('person-id', this.personId); this.sendSetPropertyEvent('person-id', this.personId);
this.sendSetPropertyEvent('person', this.person); this.sendSetPropertyEvent('person', this.person);
......
...@@ -63,7 +63,7 @@ class AuthDemo extends ScopedElementsMixin(DBPLitElement) { ...@@ -63,7 +63,7 @@ class AuthDemo extends ScopedElementsMixin(DBPLitElement) {
return; return;
} }
console.log(window.DBPAuthTokenParsed); console.log(window.DBPAuthToken);
} }
render() { render() {
......
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