zudoku 0.35.0 → 0.35.1
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/config/validators/common.d.ts +3 -3
- package/dist/config/validators/common.js +1 -1
- package/dist/config/validators/common.js.map +1 -1
- package/dist/config/validators/validate.d.ts +1 -1
- package/dist/lib/authentication/providers/openid.js +4 -1
- package/dist/lib/authentication/providers/openid.js.map +1 -1
- package/lib/{OasProvider-DEL8ulKm.js → OasProvider-vimCZXXF.js} +2 -2
- package/lib/{OasProvider-DEL8ulKm.js.map → OasProvider-vimCZXXF.js.map} +1 -1
- package/lib/{OperationList-D6goKbzX.js → OperationList-C6Tumce9.js} +2 -2
- package/lib/{OperationList-D6goKbzX.js.map → OperationList-C6Tumce9.js.map} +1 -1
- package/lib/{createServer-BNBGpbLa.js → createServer-BEFAOb-x.js} +227 -221
- package/lib/createServer-BEFAOb-x.js.map +1 -0
- package/lib/{index-PKytqmuw.js → index-OD2IZ2Nn.js} +4 -4
- package/lib/{index-PKytqmuw.js.map → index-OD2IZ2Nn.js.map} +1 -1
- package/lib/zudoku.auth-openid.js +94 -94
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.plugin-openapi.js +1 -1
- package/package.json +2 -2
- package/src/lib/authentication/providers/openid.tsx +5 -1
- package/lib/createServer-BNBGpbLa.js.map +0 -1
|
@@ -23,8 +23,8 @@ function De() {
|
|
|
23
23
|
"warn",
|
|
24
24
|
"error"
|
|
25
25
|
], r = {}, i = null;
|
|
26
|
-
function c(l,
|
|
27
|
-
var u = l[
|
|
26
|
+
function c(l, y) {
|
|
27
|
+
var u = l[y];
|
|
28
28
|
if (typeof u.bind == "function")
|
|
29
29
|
return u.bind(l);
|
|
30
30
|
try {
|
|
@@ -35,57 +35,57 @@ function De() {
|
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function p() {
|
|
39
39
|
console.log && (console.log.apply ? console.log.apply(console, arguments) : Function.prototype.apply.apply(console.log, [console, arguments])), console.trace && console.trace();
|
|
40
40
|
}
|
|
41
41
|
function w(l) {
|
|
42
|
-
return l === "debug" && (l = "log"), typeof console === n ? !1 : l === "trace" && o ?
|
|
42
|
+
return l === "debug" && (l = "log"), typeof console === n ? !1 : l === "trace" && o ? p : console[l] !== void 0 ? c(console, l) : console.log !== void 0 ? c(console, "log") : e;
|
|
43
43
|
}
|
|
44
|
-
function
|
|
45
|
-
for (var l = this.getLevel(),
|
|
46
|
-
var u = a[
|
|
47
|
-
this[u] =
|
|
44
|
+
function f() {
|
|
45
|
+
for (var l = this.getLevel(), y = 0; y < a.length; y++) {
|
|
46
|
+
var u = a[y];
|
|
47
|
+
this[u] = y < l ? e : this.methodFactory(u, l, this.name);
|
|
48
48
|
}
|
|
49
49
|
if (this.log = this.debug, typeof console === n && l < this.levels.SILENT)
|
|
50
50
|
return "No console available for logging";
|
|
51
51
|
}
|
|
52
|
-
function
|
|
52
|
+
function g(l) {
|
|
53
53
|
return function() {
|
|
54
|
-
typeof console !== n && (
|
|
54
|
+
typeof console !== n && (f.call(this), this[l].apply(this, arguments));
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
|
-
function
|
|
58
|
-
return w(l) ||
|
|
57
|
+
function v(l, y, u) {
|
|
58
|
+
return w(l) || g.apply(this, arguments);
|
|
59
59
|
}
|
|
60
|
-
function h(l,
|
|
61
|
-
var u = this, J, $, R,
|
|
62
|
-
typeof l == "string" ?
|
|
60
|
+
function h(l, y) {
|
|
61
|
+
var u = this, J, $, R, S = "loglevel";
|
|
62
|
+
typeof l == "string" ? S += ":" + l : typeof l == "symbol" && (S = void 0);
|
|
63
63
|
function Ee(d) {
|
|
64
|
-
var
|
|
65
|
-
if (!(typeof window === n || !
|
|
64
|
+
var b = (a[d] || "silent").toUpperCase();
|
|
65
|
+
if (!(typeof window === n || !S)) {
|
|
66
66
|
try {
|
|
67
|
-
window.localStorage[
|
|
67
|
+
window.localStorage[S] = b;
|
|
68
68
|
return;
|
|
69
69
|
} catch {
|
|
70
70
|
}
|
|
71
71
|
try {
|
|
72
|
-
window.document.cookie = encodeURIComponent(
|
|
72
|
+
window.document.cookie = encodeURIComponent(S) + "=" + b + ";";
|
|
73
73
|
} catch {
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
function te() {
|
|
78
78
|
var d;
|
|
79
|
-
if (!(typeof window === n || !
|
|
79
|
+
if (!(typeof window === n || !S)) {
|
|
80
80
|
try {
|
|
81
|
-
d = window.localStorage[
|
|
81
|
+
d = window.localStorage[S];
|
|
82
82
|
} catch {
|
|
83
83
|
}
|
|
84
84
|
if (typeof d === n)
|
|
85
85
|
try {
|
|
86
|
-
var
|
|
86
|
+
var b = window.document.cookie, O = encodeURIComponent(S), re = b.indexOf(O + "=");
|
|
87
87
|
re !== -1 && (d = /^([^;]+)/.exec(
|
|
88
|
-
|
|
88
|
+
b.slice(re + O.length + 1)
|
|
89
89
|
)[1]);
|
|
90
90
|
} catch {
|
|
91
91
|
}
|
|
@@ -93,21 +93,21 @@ function De() {
|
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
function Re() {
|
|
96
|
-
if (!(typeof window === n || !
|
|
96
|
+
if (!(typeof window === n || !S)) {
|
|
97
97
|
try {
|
|
98
|
-
window.localStorage.removeItem(
|
|
98
|
+
window.localStorage.removeItem(S);
|
|
99
99
|
} catch {
|
|
100
100
|
}
|
|
101
101
|
try {
|
|
102
|
-
window.document.cookie = encodeURIComponent(
|
|
102
|
+
window.document.cookie = encodeURIComponent(S) + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC";
|
|
103
103
|
} catch {
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
107
|
function U(d) {
|
|
108
|
-
var
|
|
109
|
-
if (typeof
|
|
110
|
-
return
|
|
108
|
+
var b = d;
|
|
109
|
+
if (typeof b == "string" && u.levels[b.toUpperCase()] !== void 0 && (b = u.levels[b.toUpperCase()]), typeof b == "number" && b >= 0 && b <= u.levels.SILENT)
|
|
110
|
+
return b;
|
|
111
111
|
throw new TypeError("log.setLevel() called with invalid level: " + d);
|
|
112
112
|
}
|
|
113
113
|
u.name = l, u.levels = {
|
|
@@ -117,34 +117,34 @@ function De() {
|
|
|
117
117
|
WARN: 3,
|
|
118
118
|
ERROR: 4,
|
|
119
119
|
SILENT: 5
|
|
120
|
-
}, u.methodFactory =
|
|
120
|
+
}, u.methodFactory = y || v, u.getLevel = function() {
|
|
121
121
|
return R ?? $ ?? J;
|
|
122
|
-
}, u.setLevel = function(d,
|
|
123
|
-
return R = U(d),
|
|
122
|
+
}, u.setLevel = function(d, b) {
|
|
123
|
+
return R = U(d), b !== !1 && Ee(R), f.call(u);
|
|
124
124
|
}, u.setDefaultLevel = function(d) {
|
|
125
125
|
$ = U(d), te() || u.setLevel(d, !1);
|
|
126
126
|
}, u.resetLevel = function() {
|
|
127
|
-
R = null, Re(),
|
|
127
|
+
R = null, Re(), f.call(u);
|
|
128
128
|
}, u.enableAll = function(d) {
|
|
129
129
|
u.setLevel(u.levels.TRACE, d);
|
|
130
130
|
}, u.disableAll = function(d) {
|
|
131
131
|
u.setLevel(u.levels.SILENT, d);
|
|
132
132
|
}, u.rebuild = function() {
|
|
133
|
-
if (i !== u && (J = U(i.getLevel())),
|
|
133
|
+
if (i !== u && (J = U(i.getLevel())), f.call(u), i === u)
|
|
134
134
|
for (var d in r)
|
|
135
135
|
r[d].rebuild();
|
|
136
136
|
}, J = U(
|
|
137
137
|
i ? i.getLevel() : "WARN"
|
|
138
138
|
);
|
|
139
139
|
var ne = te();
|
|
140
|
-
ne != null && (R = U(ne)),
|
|
140
|
+
ne != null && (R = U(ne)), f.call(u);
|
|
141
141
|
}
|
|
142
|
-
i = new h(), i.getLogger = function(
|
|
143
|
-
if (typeof
|
|
142
|
+
i = new h(), i.getLogger = function(y) {
|
|
143
|
+
if (typeof y != "symbol" && typeof y != "string" || y === "")
|
|
144
144
|
throw new TypeError("You must supply a name when creating a logger.");
|
|
145
|
-
var u = r[
|
|
146
|
-
return u || (u = r[
|
|
147
|
-
|
|
145
|
+
var u = r[y];
|
|
146
|
+
return u || (u = r[y] = new h(
|
|
147
|
+
y,
|
|
148
148
|
i.methodFactory
|
|
149
149
|
)), u;
|
|
150
150
|
};
|
|
@@ -220,7 +220,7 @@ class Ve {
|
|
|
220
220
|
this.cache.set(e, n), this.cache.size >= this.maxSize && (this._cache = this.cache, this.cache = /* @__PURE__ */ new Map());
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
|
-
class
|
|
223
|
+
class T extends Error {
|
|
224
224
|
constructor(e) {
|
|
225
225
|
var n;
|
|
226
226
|
super(e ?? "operation not supported"), this.name = this.constructor.name, (n = Error.captureStackTrace) == null || n.call(Error, this, this.constructor);
|
|
@@ -347,7 +347,7 @@ function it(t) {
|
|
|
347
347
|
case "SHA-512":
|
|
348
348
|
return "PS512";
|
|
349
349
|
default:
|
|
350
|
-
throw new
|
|
350
|
+
throw new T("unsupported RsaHashedKeyAlgorithm hash name");
|
|
351
351
|
}
|
|
352
352
|
}
|
|
353
353
|
function at(t) {
|
|
@@ -359,7 +359,7 @@ function at(t) {
|
|
|
359
359
|
case "SHA-512":
|
|
360
360
|
return "RS512";
|
|
361
361
|
default:
|
|
362
|
-
throw new
|
|
362
|
+
throw new T("unsupported RsaHashedKeyAlgorithm hash name");
|
|
363
363
|
}
|
|
364
364
|
}
|
|
365
365
|
function st(t) {
|
|
@@ -371,7 +371,7 @@ function st(t) {
|
|
|
371
371
|
case "P-521":
|
|
372
372
|
return "ES512";
|
|
373
373
|
default:
|
|
374
|
-
throw new
|
|
374
|
+
throw new T("unsupported EcKeyAlgorithm namedCurve");
|
|
375
375
|
}
|
|
376
376
|
}
|
|
377
377
|
function ct(t) {
|
|
@@ -386,7 +386,7 @@ function ct(t) {
|
|
|
386
386
|
case "Ed448":
|
|
387
387
|
return "EdDSA";
|
|
388
388
|
default:
|
|
389
|
-
throw new
|
|
389
|
+
throw new T("unsupported CryptoKey algorithm name");
|
|
390
390
|
}
|
|
391
391
|
}
|
|
392
392
|
function H(t) {
|
|
@@ -443,7 +443,7 @@ async function ut(t, e, n, o, a) {
|
|
|
443
443
|
break;
|
|
444
444
|
}
|
|
445
445
|
default:
|
|
446
|
-
throw new
|
|
446
|
+
throw new T("unsupported client token_endpoint_auth_method");
|
|
447
447
|
}
|
|
448
448
|
}
|
|
449
449
|
async function lt(t, e, n) {
|
|
@@ -453,29 +453,29 @@ async function lt(t, e, n) {
|
|
|
453
453
|
return `${o}.${a}`;
|
|
454
454
|
}
|
|
455
455
|
async function dt(t, e, n, o, a, r) {
|
|
456
|
-
var
|
|
457
|
-
const { privateKey: i, publicKey: c, nonce:
|
|
456
|
+
var v;
|
|
457
|
+
const { privateKey: i, publicKey: c, nonce: p = we.get(n.origin) } = e;
|
|
458
458
|
if (!Ze(i))
|
|
459
459
|
throw new TypeError('"DPoP.privateKey" must be a private CryptoKey');
|
|
460
460
|
if (!Ye(c))
|
|
461
461
|
throw new TypeError('"DPoP.publicKey" must be a public CryptoKey');
|
|
462
|
-
if (
|
|
462
|
+
if (p !== void 0 && !m(p))
|
|
463
463
|
throw new TypeError('"DPoP.nonce" must be a non-empty string or undefined');
|
|
464
464
|
if (!c.extractable)
|
|
465
465
|
throw new TypeError('"DPoP.publicKey.extractable" must be true');
|
|
466
|
-
const w = X() + a,
|
|
466
|
+
const w = X() + a, f = {
|
|
467
467
|
alg: ct(i),
|
|
468
468
|
typ: "dpop+jwt",
|
|
469
469
|
jwk: await ft(c)
|
|
470
|
-
},
|
|
470
|
+
}, g = {
|
|
471
471
|
iat: w,
|
|
472
472
|
jti: Q(),
|
|
473
473
|
htm: o,
|
|
474
|
-
nonce:
|
|
474
|
+
nonce: p,
|
|
475
475
|
htu: `${n.origin}${n.pathname}`,
|
|
476
476
|
ath: r ? k(await crypto.subtle.digest("SHA-256", E(r))) : void 0
|
|
477
477
|
};
|
|
478
|
-
(
|
|
478
|
+
(v = e[Ke]) == null || v.call(e, f, g), t.set("dpop", await lt(f, g, i));
|
|
479
479
|
}
|
|
480
480
|
let N;
|
|
481
481
|
async function ht(t) {
|
|
@@ -574,7 +574,7 @@ async function Se(t, e, n, o = !1, a = !1) {
|
|
|
574
574
|
if (!m(r.token_type))
|
|
575
575
|
throw new s('"response" body "token_type" property must be a non-empty string');
|
|
576
576
|
if (r.token_type = r.token_type.toLowerCase(), r.token_type !== "dpop" && r.token_type !== "bearer")
|
|
577
|
-
throw new
|
|
577
|
+
throw new T("unsupported `token_type` value");
|
|
578
578
|
if (r.expires_in !== void 0 && (typeof r.expires_in != "number" || r.expires_in <= 0))
|
|
579
579
|
throw new s('"response" body "expires_in" property must be a positive number');
|
|
580
580
|
if (!a && r.refresh_token !== void 0 && !m(r.refresh_token))
|
|
@@ -668,8 +668,8 @@ async function Rt(t, e, n, o, a) {
|
|
|
668
668
|
if (a !== F) {
|
|
669
669
|
if (typeof a != "number" || a < 0)
|
|
670
670
|
throw new TypeError('"maxAge" must be a non-negative number');
|
|
671
|
-
const c = X() + H(e),
|
|
672
|
-
if (i.auth_time + a < c -
|
|
671
|
+
const c = X() + H(e), p = ge(e);
|
|
672
|
+
if (i.auth_time + a < c - p)
|
|
673
673
|
throw new s("too much time has elapsed since the last End-User authentication");
|
|
674
674
|
}
|
|
675
675
|
switch (o) {
|
|
@@ -716,7 +716,7 @@ function Ut(t) {
|
|
|
716
716
|
case "P-521":
|
|
717
717
|
return "SHA-512";
|
|
718
718
|
default:
|
|
719
|
-
throw new
|
|
719
|
+
throw new T();
|
|
720
720
|
}
|
|
721
721
|
}
|
|
722
722
|
function Ae(t) {
|
|
@@ -736,7 +736,7 @@ function Ae(t) {
|
|
|
736
736
|
saltLength: parseInt(t.algorithm.hash.name.slice(-3), 10) >> 3
|
|
737
737
|
};
|
|
738
738
|
default:
|
|
739
|
-
throw new
|
|
739
|
+
throw new T();
|
|
740
740
|
}
|
|
741
741
|
case "RSASSA-PKCS1-v1_5":
|
|
742
742
|
return he(t.algorithm), t.algorithm.name;
|
|
@@ -744,7 +744,7 @@ function Ae(t) {
|
|
|
744
744
|
case "Ed25519":
|
|
745
745
|
return t.algorithm.name;
|
|
746
746
|
}
|
|
747
|
-
throw new
|
|
747
|
+
throw new T();
|
|
748
748
|
}
|
|
749
749
|
const ke = Symbol();
|
|
750
750
|
async function Lt(t, e, n, o) {
|
|
@@ -753,27 +753,27 @@ async function Lt(t, e, n, o) {
|
|
|
753
753
|
throw new s("JWT signature verification failed");
|
|
754
754
|
}
|
|
755
755
|
async function xt(t, e, n, o, a, r) {
|
|
756
|
-
let { 0: i, 1: c, 2:
|
|
756
|
+
let { 0: i, 1: c, 2: p, length: w } = t.split(".");
|
|
757
757
|
if (w === 5)
|
|
758
758
|
if (r !== void 0)
|
|
759
|
-
t = await r(t), { 0: i, 1: c, 2:
|
|
759
|
+
t = await r(t), { 0: i, 1: c, 2: p, length: w } = t.split(".");
|
|
760
760
|
else
|
|
761
|
-
throw new
|
|
761
|
+
throw new T("JWE structure JWTs are not supported");
|
|
762
762
|
if (w !== 3)
|
|
763
763
|
throw new s("Invalid JWT");
|
|
764
|
-
let
|
|
764
|
+
let f;
|
|
765
765
|
try {
|
|
766
|
-
|
|
766
|
+
f = JSON.parse(E(k(i)));
|
|
767
767
|
} catch (l) {
|
|
768
768
|
throw new s("failed to parse JWT Header body as base64url encoded JSON", { cause: l });
|
|
769
769
|
}
|
|
770
|
-
if (!x(
|
|
770
|
+
if (!x(f))
|
|
771
771
|
throw new s("JWT Header must be a top level object");
|
|
772
|
-
if (e(
|
|
772
|
+
if (e(f), f.crit !== void 0)
|
|
773
773
|
throw new s('unexpected JWT "crit" header parameter');
|
|
774
|
-
const
|
|
775
|
-
let
|
|
776
|
-
n !== ke && (
|
|
774
|
+
const g = k(p);
|
|
775
|
+
let v;
|
|
776
|
+
n !== ke && (v = await n(f), await Lt(i, c, v, g));
|
|
777
777
|
let h;
|
|
778
778
|
try {
|
|
779
779
|
h = JSON.parse(E(k(c)));
|
|
@@ -801,7 +801,7 @@ async function xt(t, e, n, o, a, r) {
|
|
|
801
801
|
}
|
|
802
802
|
if (h.aud !== void 0 && typeof h.aud != "string" && !Array.isArray(h.aud))
|
|
803
803
|
throw new s('unexpected JWT "aud" (audience) claim type');
|
|
804
|
-
return { header:
|
|
804
|
+
return { header: f, claims: h, signature: g, key: v, jwt: t };
|
|
805
805
|
}
|
|
806
806
|
function Ct(t, e, n) {
|
|
807
807
|
if (t !== void 0) {
|
|
@@ -857,9 +857,9 @@ function Jt(t, e, n, o) {
|
|
|
857
857
|
error_description: A(n, "error_description"),
|
|
858
858
|
error_uri: A(n, "error_uri")
|
|
859
859
|
};
|
|
860
|
-
const c = A(n, "id_token"),
|
|
861
|
-
if (c !== void 0 ||
|
|
862
|
-
throw new
|
|
860
|
+
const c = A(n, "id_token"), p = A(n, "token");
|
|
861
|
+
if (c !== void 0 || p !== void 0)
|
|
862
|
+
throw new T("implicit and hybrid flows are not supported");
|
|
863
863
|
return St(new URLSearchParams(n));
|
|
864
864
|
}
|
|
865
865
|
function Ot({
|
|
@@ -913,7 +913,7 @@ class Dt {
|
|
|
913
913
|
redirectToAfterSignIn: r,
|
|
914
914
|
redirectToAfterSignOut: i,
|
|
915
915
|
basePath: c,
|
|
916
|
-
scopes:
|
|
916
|
+
scopes: p
|
|
917
917
|
}) {
|
|
918
918
|
_(this, "client");
|
|
919
919
|
_(this, "issuer");
|
|
@@ -966,27 +966,27 @@ class Dt {
|
|
|
966
966
|
r,
|
|
967
967
|
i.toString(),
|
|
968
968
|
o
|
|
969
|
-
),
|
|
969
|
+
), p = await Rt(
|
|
970
970
|
a,
|
|
971
971
|
this.client,
|
|
972
972
|
c
|
|
973
973
|
);
|
|
974
|
-
this.setTokensFromResponse(
|
|
975
|
-
const w = await this.getAccessToken(),
|
|
974
|
+
this.setTokensFromResponse(p);
|
|
975
|
+
const w = await this.getAccessToken(), g = await (await wt(
|
|
976
976
|
a,
|
|
977
977
|
this.client,
|
|
978
978
|
w
|
|
979
|
-
)).json(),
|
|
980
|
-
sub:
|
|
981
|
-
email:
|
|
982
|
-
name:
|
|
983
|
-
emailVerified:
|
|
984
|
-
pictureUrl:
|
|
979
|
+
)).json(), v = {
|
|
980
|
+
sub: g.sub,
|
|
981
|
+
email: g.email,
|
|
982
|
+
name: g.name,
|
|
983
|
+
emailVerified: g.email_verified ?? !1,
|
|
984
|
+
pictureUrl: g.picture
|
|
985
985
|
};
|
|
986
986
|
L.setState({
|
|
987
987
|
isAuthenticated: !0,
|
|
988
988
|
isPending: !1,
|
|
989
|
-
profile:
|
|
989
|
+
profile: v
|
|
990
990
|
});
|
|
991
991
|
const h = sessionStorage.getItem("redirect-to") ?? "/";
|
|
992
992
|
return sessionStorage.removeItem("redirect-to"), h;
|
|
@@ -994,7 +994,7 @@ class Dt {
|
|
|
994
994
|
this.client = {
|
|
995
995
|
client_id: o,
|
|
996
996
|
token_endpoint_auth_method: "none"
|
|
997
|
-
}, this.audience = n, this.issuer = e, this.callbackUrlPath = oe(c, "/oauth/callback"), this.scopes =
|
|
997
|
+
}, this.audience = n, this.issuer = e, this.callbackUrlPath = oe(c, "/oauth/callback"), this.scopes = p ?? ["openid", "profile", "email"];
|
|
998
998
|
const w = oe(c, "/");
|
|
999
999
|
this.logoutRedirectUrlPath = w, this.redirectToAfterSignUp = a ?? w, this.redirectToAfterSignIn = r ?? w, this.redirectToAfterSignOut = i ?? w;
|
|
1000
1000
|
}
|
|
@@ -1043,7 +1043,7 @@ class Dt {
|
|
|
1043
1043
|
redirectTo: e,
|
|
1044
1044
|
isSignUp: n = !1
|
|
1045
1045
|
}) {
|
|
1046
|
-
var
|
|
1046
|
+
var f, g;
|
|
1047
1047
|
const o = "S256", a = await this.getAuthServer();
|
|
1048
1048
|
if (!a.authorization_endpoint)
|
|
1049
1049
|
throw new P("No authorization endpoint");
|
|
@@ -1051,18 +1051,18 @@ class Dt {
|
|
|
1051
1051
|
sessionStorage.setItem(M, r);
|
|
1052
1052
|
const c = new URL(
|
|
1053
1053
|
a.authorization_endpoint
|
|
1054
|
-
);
|
|
1055
|
-
sessionStorage.setItem("redirect-to",
|
|
1056
|
-
const
|
|
1057
|
-
if (
|
|
1054
|
+
), p = e.startsWith(window.location.origin) ? e.slice(window.location.origin.length) : e;
|
|
1055
|
+
sessionStorage.setItem("redirect-to", p);
|
|
1056
|
+
const w = new URL(window.location.origin);
|
|
1057
|
+
if (w.pathname = this.callbackUrlPath, w.search = "", c.searchParams.set("client_id", this.client.client_id), c.searchParams.set("redirect_uri", w.toString()), c.searchParams.set("response_type", "code"), c.searchParams.set("scope", this.scopes.join(" ")), c.searchParams.set("code_challenge", i), c.searchParams.set(
|
|
1058
1058
|
"code_challenge_method",
|
|
1059
1059
|
o
|
|
1060
|
-
), this.audience && c.searchParams.set("audience", this.audience), (
|
|
1060
|
+
), this.audience && c.searchParams.set("audience", this.audience), (f = this.onAuthorizationUrl) == null || f.call(this, c, {
|
|
1061
1061
|
isSignIn: !n,
|
|
1062
1062
|
isSignUp: n
|
|
1063
|
-
}), ((
|
|
1064
|
-
const
|
|
1065
|
-
c.searchParams.set("state",
|
|
1063
|
+
}), ((g = a.code_challenge_methods_supported) == null ? void 0 : g.includes("S256")) !== !0) {
|
|
1064
|
+
const v = nt();
|
|
1065
|
+
c.searchParams.set("state", v);
|
|
1066
1066
|
}
|
|
1067
1067
|
location.href = c.href;
|
|
1068
1068
|
}
|