@pristy/pristy-libvue 0.23.4 → 0.23.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1294,10 +1294,10 @@ const U = new TI(), uI = 60 * 1e3, w = e({
1294
1294
  },
1295
1295
  actions: {
1296
1296
  logout() {
1297
- console.log(`logout with ${this.email}`), clearTimeout(this.keycloakRenewTO), t && t.logout(), this.token = "", this.isAdmin = !1, this.person = null, this.apiAlfresco = null;
1297
+ console.log(`logout with ${this.email}`), t && t.logout(), this.token = "", this.isAdmin = !1, this.person = null, this.apiAlfresco = null;
1298
1298
  const N = s();
1299
- if (N.AUTH === "keycloak")
1300
- return W.get(`${N.ALFRESCO_HOST}/alfresco/logout`).then(() => {
1299
+ if (N.AUTH === "keycloak" || N.AUTH === "lemonldap")
1300
+ return clearTimeout(this.keycloakRenewTO), W.get(`${N.ALFRESCO_HOST}/alfresco/logout`).then(() => {
1301
1301
  localStorage.removeItem("ticket-ECM"), localStorage.removeItem("ACS_USERNAME"), this.keycloak.logout();
1302
1302
  });
1303
1303
  },
@@ -1309,6 +1309,12 @@ const U = new TI(), uI = 60 * 1e3, w = e({
1309
1309
  },
1310
1310
  getAlfTicket() {
1311
1311
  const N = s();
1312
+ if (N.AUTH !== "keycloak" && N.AUTH !== "lemonldap") {
1313
+ console.warn(
1314
+ "getAlfTicket() won't work in standard AUTH configuration"
1315
+ );
1316
+ return;
1317
+ }
1312
1318
  return W.get(
1313
1319
  `${N.ALFRESCO_HOST}/alfresco/api/-default-/public/authentication/versions/1/tickets/-me-`,
1314
1320
  {
@@ -1326,7 +1332,9 @@ const U = new TI(), uI = 60 * 1e3, w = e({
1326
1332
  });
1327
1333
  },
1328
1334
  getPerson() {
1329
- return x.getPerson("-me-").then((N) => N.entry).then((N) => (this.person = N, N)).catch((N) => (this.isLoggedIn = !1, Promise.reject(N)));
1335
+ return x.getPerson("-me-").then((N) => N.entry).then((N) => (this.isLoggedIn = !0, this.person = N, N)).catch(() => {
1336
+ this.isLoggedIn = !1;
1337
+ });
1330
1338
  },
1331
1339
  async login(N, M) {
1332
1340
  if (!N || !M)