@luizleon/sf.prefeiturasp.vuecomponents 0.0.57 → 0.0.59
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.
- package/dist/axios/axiosClient.d.ts +2 -2
- package/dist/sf.prefeiturasp.vuecomponents.es.js +5 -5
- package/dist/sf.prefeiturasp.vuecomponents.es.js.map +1 -1
- package/dist/sf.prefeiturasp.vuecomponents.umd.js +1 -1
- package/dist/sf.prefeiturasp.vuecomponents.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/axios/axiosClient.ts +4 -4
- package/src/components/drawer/Drawer.d.ts +1 -1
|
@@ -2,7 +2,7 @@ import { AxiosInstance, AxiosResponse } from "axios";
|
|
|
2
2
|
import { AppResult } from "../common/appResult";
|
|
3
3
|
import Keycloak from "../keycloak";
|
|
4
4
|
declare class AxiosClient {
|
|
5
|
-
constructor(keycloak: Keycloak);
|
|
5
|
+
constructor(keycloak: Keycloak, baseUrl: string);
|
|
6
6
|
keycloak: Keycloak;
|
|
7
7
|
axios: AxiosInstance;
|
|
8
8
|
private fileName;
|
|
@@ -26,5 +26,5 @@ declare class AxiosClient {
|
|
|
26
26
|
private get tokenExchangeUrl();
|
|
27
27
|
private get isTokenExpired();
|
|
28
28
|
}
|
|
29
|
-
declare const UseAxiosClient: (keycloak: Keycloak) => AxiosClient;
|
|
29
|
+
declare const UseAxiosClient: (keycloak: Keycloak, baseURL: string) => AxiosClient;
|
|
30
30
|
export { AxiosClient, UseAxiosClient };
|
|
@@ -8567,14 +8567,14 @@ ge.getAdapter = Ks.getAdapter;
|
|
|
8567
8567
|
ge.HttpStatusCode = Up;
|
|
8568
8568
|
ge.default = ge;
|
|
8569
8569
|
class Hp {
|
|
8570
|
-
constructor(e) {
|
|
8570
|
+
constructor(e, n) {
|
|
8571
8571
|
We(this, "keycloak");
|
|
8572
8572
|
We(this, "axios");
|
|
8573
8573
|
We(this, "fileName", "silent-login.html");
|
|
8574
|
-
this.keycloak = e, this.axios = ge.create(), this.axios.defaults.baseURL =
|
|
8574
|
+
this.keycloak = e, this.axios = ge.create(), this.axios.defaults.baseURL = n, this.axios.defaults.headers.common["content-type"] = "application/json", this.axios.defaults.timeout = 1e3 * 60 * 5, this.axios.interceptors.request.use(async (r) => {
|
|
8575
8575
|
await this.SilentLogin();
|
|
8576
|
-
const
|
|
8577
|
-
return
|
|
8576
|
+
const o = this.keycloak.token;
|
|
8577
|
+
return r.headers.Authorization = `Bearer ${o}`, r;
|
|
8578
8578
|
});
|
|
8579
8579
|
}
|
|
8580
8580
|
ParseAppResult(e) {
|
|
@@ -8673,7 +8673,7 @@ class Hp {
|
|
|
8673
8673
|
return !e || !n ? !0 : n - Math.ceil((/* @__PURE__ */ new Date()).getTime() / 1e3) + (this.keycloak.timeSkew ?? 0) < 10;
|
|
8674
8674
|
}
|
|
8675
8675
|
}
|
|
8676
|
-
const Qp = (t) => new Hp(t);
|
|
8676
|
+
const Qp = (t, e) => new Hp(t, e);
|
|
8677
8677
|
kr.SetInitialTheme();
|
|
8678
8678
|
export {
|
|
8679
8679
|
mi as AppResult,
|