jcicl 1.1.1 → 1.1.3
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/.chunks/EventType.js +650 -0
- package/AuthContext/AuthProvider.d.ts +63 -0
- package/AuthContext/AuthProvider.js +227 -0
- package/AuthContext/index.d.ts +4 -0
- package/AuthContext/index.js +8 -0
- package/AuthContext/msalConfig.d.ts +56 -0
- package/AuthContext/msalConfig.js +9157 -0
- package/AuthenticatedApiClient.d.ts +42 -0
- package/AuthenticatedApiClient.js +30 -0
- package/FormFields/FormFields.js +3 -2
- package/LoginPage/LoginPage.d.ts +15 -0
- package/LoginPage/LoginPage.js +77 -0
- package/LoginPage/index.d.ts +1 -0
- package/LoginPage/index.js +4 -0
- package/ScrollContainer/ScrollContainer.js +1076 -984
- package/Table/Table.js +13020 -10033
- package/assets/style.css +2 -2
- package/assets/tailwind.css +1 -1
- package/createUseApi.d.ts +22 -0
- package/createUseApi.js +11 -0
- package/index.d.ts +6 -0
- package/index.js +59 -49
- package/package.json +3 -1
|
@@ -0,0 +1,650 @@
|
|
|
1
|
+
/*! @azure/msal-common v16.6.0 2026-05-07 */
|
|
2
|
+
const K = "msal.js.common", h = "https://login.microsoftonline.com/common/", q = "login.microsoftonline.com", B = "common", W = "adfs", Y = "dstsv2", x = `${h}discovery/instance?api-version=1.1&authorization_endpoint=`, Q = ".ciamlogin.com", X = ".onmicrosoft.com", $ = "|", p = "openid", m = "profile", D = "offline_access", P = "email", j = "S256", z = "application/x-www-form-urlencoded;charset=utf-8", J = "Not Available", Z = "/", ee = "http://169.254.169.254/metadata/instance/compute/location", se = "2020-06-01", te = 2e3, oe = "TryAutoDetect", ae = "login.microsoft.com", ne = [
|
|
3
|
+
"login.microsoftonline.com",
|
|
4
|
+
"login.windows.net",
|
|
5
|
+
"login.microsoft.com",
|
|
6
|
+
"sts.windows.net"
|
|
7
|
+
], re = 240, ie = "invalid_instance", Ee = 200, ce = 400, _e = 400, Te = 499, le = 500, Re = 599, Ae = {
|
|
8
|
+
GET: "GET",
|
|
9
|
+
POST: "POST"
|
|
10
|
+
}, N = [
|
|
11
|
+
p,
|
|
12
|
+
m,
|
|
13
|
+
D
|
|
14
|
+
], Se = [...N, P], ue = {
|
|
15
|
+
CONTENT_TYPE: "Content-Type",
|
|
16
|
+
CONTENT_LENGTH: "Content-Length",
|
|
17
|
+
RETRY_AFTER: "Retry-After",
|
|
18
|
+
CCS_HEADER: "X-AnchorMailbox",
|
|
19
|
+
WWWAuthenticate: "WWW-Authenticate",
|
|
20
|
+
AuthenticationInfo: "Authentication-Info",
|
|
21
|
+
X_MS_REQUEST_ID: "x-ms-request-id",
|
|
22
|
+
X_MS_HTTP_VERSION: "x-ms-httpver"
|
|
23
|
+
}, Oe = {
|
|
24
|
+
ACTIVE_ACCOUNT_FILTERS: "active-account-filters"
|
|
25
|
+
// new cache entry for active_account for a more robust version for browser
|
|
26
|
+
}, Ce = {
|
|
27
|
+
COMMON: "common",
|
|
28
|
+
ORGANIZATIONS: "organizations",
|
|
29
|
+
CONSUMERS: "consumers"
|
|
30
|
+
}, Ie = {
|
|
31
|
+
ACCESS_TOKEN: "access_token",
|
|
32
|
+
XMS_CC: "xms_cc"
|
|
33
|
+
}, Ne = {
|
|
34
|
+
LOGIN: "login",
|
|
35
|
+
SELECT_ACCOUNT: "select_account",
|
|
36
|
+
CONSENT: "consent",
|
|
37
|
+
NONE: "none",
|
|
38
|
+
CREATE: "create",
|
|
39
|
+
NO_SESSION: "no_session"
|
|
40
|
+
}, de = {
|
|
41
|
+
CODE: "code",
|
|
42
|
+
IDTOKEN_TOKEN: "id_token token",
|
|
43
|
+
IDTOKEN_TOKEN_REFRESHTOKEN: "id_token token refresh_token"
|
|
44
|
+
}, ge = {
|
|
45
|
+
QUERY: "query",
|
|
46
|
+
FRAGMENT: "fragment",
|
|
47
|
+
FORM_POST: "form_post"
|
|
48
|
+
}, he = {
|
|
49
|
+
IMPLICIT_GRANT: "implicit",
|
|
50
|
+
AUTHORIZATION_CODE_GRANT: "authorization_code",
|
|
51
|
+
CLIENT_CREDENTIALS_GRANT: "client_credentials",
|
|
52
|
+
RESOURCE_OWNER_PASSWORD_GRANT: "password",
|
|
53
|
+
REFRESH_TOKEN_GRANT: "refresh_token",
|
|
54
|
+
DEVICE_CODE_GRANT: "device_code",
|
|
55
|
+
JWT_BEARER: "urn:ietf:params:oauth:grant-type:jwt-bearer"
|
|
56
|
+
}, pe = "MSSTS", me = "ADFS", De = "Generic", Pe = "-", Le = ".", fe = {
|
|
57
|
+
ID_TOKEN: "IdToken",
|
|
58
|
+
ACCESS_TOKEN: "AccessToken",
|
|
59
|
+
ACCESS_TOKEN_WITH_AUTH_SCHEME: "AccessToken_With_AuthScheme",
|
|
60
|
+
REFRESH_TOKEN: "RefreshToken"
|
|
61
|
+
}, Me = "appmetadata", Ue = "client_info", ke = "1", He = "authority-metadata", Fe = 3600 * 24, be = {
|
|
62
|
+
CONFIG: "config",
|
|
63
|
+
CACHE: "cache",
|
|
64
|
+
NETWORK: "network",
|
|
65
|
+
HARDCODED_VALUES: "hardcoded_values"
|
|
66
|
+
}, ve = 5, Ge = 330, Ve = 50, we = "server-telemetry", ye = "|", Ke = ",", qe = "1", Be = "0", We = "unknown_error", Ye = {
|
|
67
|
+
BEARER: "Bearer",
|
|
68
|
+
POP: "pop",
|
|
69
|
+
SSH: "ssh-cert"
|
|
70
|
+
}, xe = 60, Qe = 3600, Xe = "throttling", $e = "retry-after, h429", je = "invalid_grant", ze = "client_mismatch", Je = {
|
|
71
|
+
FAILED_AUTO_DETECTION: "1",
|
|
72
|
+
INTERNAL_CACHE: "2",
|
|
73
|
+
ENVIRONMENT_VARIABLE: "3",
|
|
74
|
+
IMDS: "4"
|
|
75
|
+
}, Ze = {
|
|
76
|
+
CONFIGURED_MATCHES_DETECTED: "1",
|
|
77
|
+
CONFIGURED_NO_AUTO_DETECTION: "2",
|
|
78
|
+
CONFIGURED_NOT_DETECTED: "3",
|
|
79
|
+
AUTO_DETECTION_REQUESTED_SUCCESSFUL: "4",
|
|
80
|
+
AUTO_DETECTION_REQUESTED_FAILED: "5"
|
|
81
|
+
}, es = {
|
|
82
|
+
// When a token is found in the cache or the cache is not supposed to be hit when making the request
|
|
83
|
+
NOT_APPLICABLE: "0",
|
|
84
|
+
// When the token request goes to the identity provider because force_refresh was set to true. Also occurs if claims were requested
|
|
85
|
+
FORCE_REFRESH_OR_CLAIMS: "1",
|
|
86
|
+
// When the token request goes to the identity provider because no cached access token exists
|
|
87
|
+
NO_CACHED_ACCESS_TOKEN: "2",
|
|
88
|
+
// When the token request goes to the identity provider because cached access token expired
|
|
89
|
+
CACHED_ACCESS_TOKEN_EXPIRED: "3",
|
|
90
|
+
// When the token request goes to the identity provider because refresh_in was used and the existing token needs to be refreshed
|
|
91
|
+
PROACTIVELY_REFRESHED: "4"
|
|
92
|
+
}, ss = {
|
|
93
|
+
Jwt: "JWT",
|
|
94
|
+
Jwk: "JWK",
|
|
95
|
+
Pop: "pop"
|
|
96
|
+
}, ts = 300;
|
|
97
|
+
/*! @azure/msal-common v16.6.0 2026-05-07 */
|
|
98
|
+
function d(t) {
|
|
99
|
+
return `See https://aka.ms/msal.js.errors#${t} for details`;
|
|
100
|
+
}
|
|
101
|
+
class E extends Error {
|
|
102
|
+
constructor(e, s, o) {
|
|
103
|
+
const n = s || (e ? d(e) : ""), r = n ? `${e}: ${n}` : e;
|
|
104
|
+
super(r), Object.setPrototypeOf(this, E.prototype), this.errorCode = e || "", this.errorMessage = n || "", this.subError = o || "", this.name = "AuthError";
|
|
105
|
+
}
|
|
106
|
+
setCorrelationId(e) {
|
|
107
|
+
this.correlationId = e;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
function os(t, e) {
|
|
111
|
+
return new E(t, e || d(t));
|
|
112
|
+
}
|
|
113
|
+
/*! @azure/msal-common v16.6.0 2026-05-07 */
|
|
114
|
+
var a;
|
|
115
|
+
(function(t) {
|
|
116
|
+
t[t.Error = 0] = "Error", t[t.Warning = 1] = "Warning", t[t.Info = 2] = "Info", t[t.Verbose = 3] = "Verbose", t[t.Trace = 4] = "Trace";
|
|
117
|
+
})(a || (a = {}));
|
|
118
|
+
const L = 50, f = 500, i = /* @__PURE__ */ new Map();
|
|
119
|
+
function M(t, e) {
|
|
120
|
+
i.delete(t), i.set(t, e);
|
|
121
|
+
}
|
|
122
|
+
function U(t, e) {
|
|
123
|
+
const s = Date.now();
|
|
124
|
+
let o = i.get(t);
|
|
125
|
+
if (o)
|
|
126
|
+
M(t, o);
|
|
127
|
+
else if (o = { logs: [], firstEventTime: s }, i.set(t, o), i.size > L) {
|
|
128
|
+
const n = i.keys().next().value;
|
|
129
|
+
n && i.delete(n);
|
|
130
|
+
}
|
|
131
|
+
o.logs.push({
|
|
132
|
+
...e,
|
|
133
|
+
milliseconds: s - o.firstEventTime
|
|
134
|
+
}), o.logs.length > f && o.logs.shift();
|
|
135
|
+
}
|
|
136
|
+
function k(t) {
|
|
137
|
+
if (t.length !== 6)
|
|
138
|
+
return !1;
|
|
139
|
+
for (let e = 0; e < t.length; e++) {
|
|
140
|
+
const s = t[e];
|
|
141
|
+
if (!(s >= "a" && s <= "z" || s >= "A" && s <= "Z" || s >= "0" && s <= "9"))
|
|
142
|
+
return !1;
|
|
143
|
+
}
|
|
144
|
+
return !0;
|
|
145
|
+
}
|
|
146
|
+
class R {
|
|
147
|
+
constructor(e, s, o) {
|
|
148
|
+
this.level = a.Info;
|
|
149
|
+
const n = () => {
|
|
150
|
+
}, r = e || R.createDefaultLoggerOptions();
|
|
151
|
+
this.localCallback = r.loggerCallback || n, this.piiLoggingEnabled = r.piiLoggingEnabled || !1, this.level = typeof r.logLevel == "number" ? r.logLevel : a.Info, this.packageName = s || "", this.packageVersion = o || "";
|
|
152
|
+
}
|
|
153
|
+
static createDefaultLoggerOptions() {
|
|
154
|
+
return {
|
|
155
|
+
loggerCallback: () => {
|
|
156
|
+
},
|
|
157
|
+
piiLoggingEnabled: !1,
|
|
158
|
+
logLevel: a.Info
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Create new Logger with existing configurations.
|
|
163
|
+
*/
|
|
164
|
+
clone(e, s) {
|
|
165
|
+
return new R({
|
|
166
|
+
loggerCallback: this.localCallback,
|
|
167
|
+
piiLoggingEnabled: this.piiLoggingEnabled,
|
|
168
|
+
logLevel: this.level
|
|
169
|
+
}, e, s);
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Log message with required options.
|
|
173
|
+
*/
|
|
174
|
+
logMessage(e, s) {
|
|
175
|
+
const o = s.correlationId;
|
|
176
|
+
if (k(e)) {
|
|
177
|
+
const T = {
|
|
178
|
+
hash: e,
|
|
179
|
+
level: s.logLevel,
|
|
180
|
+
containsPii: s.containsPii || !1,
|
|
181
|
+
milliseconds: 0
|
|
182
|
+
// Will be calculated in addLogToCache
|
|
183
|
+
};
|
|
184
|
+
U(o, T);
|
|
185
|
+
}
|
|
186
|
+
if (s.logLevel > this.level || !this.piiLoggingEnabled && s.containsPii)
|
|
187
|
+
return;
|
|
188
|
+
const _ = `${`[${(/* @__PURE__ */ new Date()).toUTCString()}] : [${o}]`} : ${this.packageName}@${this.packageVersion} : ${a[s.logLevel]} - ${e}`;
|
|
189
|
+
this.executeCallback(s.logLevel, _, s.containsPii || !1);
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Execute callback with message.
|
|
193
|
+
*/
|
|
194
|
+
executeCallback(e, s, o) {
|
|
195
|
+
this.localCallback && this.localCallback(e, s, o);
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* Logs error messages.
|
|
199
|
+
*/
|
|
200
|
+
error(e, s) {
|
|
201
|
+
this.logMessage(e, {
|
|
202
|
+
logLevel: a.Error,
|
|
203
|
+
containsPii: !1,
|
|
204
|
+
correlationId: s
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* Logs error messages with PII.
|
|
209
|
+
*/
|
|
210
|
+
errorPii(e, s) {
|
|
211
|
+
this.logMessage(e, {
|
|
212
|
+
logLevel: a.Error,
|
|
213
|
+
containsPii: !0,
|
|
214
|
+
correlationId: s
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Logs warning messages.
|
|
219
|
+
*/
|
|
220
|
+
warning(e, s) {
|
|
221
|
+
this.logMessage(e, {
|
|
222
|
+
logLevel: a.Warning,
|
|
223
|
+
containsPii: !1,
|
|
224
|
+
correlationId: s
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* Logs warning messages with PII.
|
|
229
|
+
*/
|
|
230
|
+
warningPii(e, s) {
|
|
231
|
+
this.logMessage(e, {
|
|
232
|
+
logLevel: a.Warning,
|
|
233
|
+
containsPii: !0,
|
|
234
|
+
correlationId: s
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* Logs info messages.
|
|
239
|
+
*/
|
|
240
|
+
info(e, s) {
|
|
241
|
+
this.logMessage(e, {
|
|
242
|
+
logLevel: a.Info,
|
|
243
|
+
containsPii: !1,
|
|
244
|
+
correlationId: s
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Logs info messages with PII.
|
|
249
|
+
*/
|
|
250
|
+
infoPii(e, s) {
|
|
251
|
+
this.logMessage(e, {
|
|
252
|
+
logLevel: a.Info,
|
|
253
|
+
containsPii: !0,
|
|
254
|
+
correlationId: s
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* Logs verbose messages.
|
|
259
|
+
*/
|
|
260
|
+
verbose(e, s) {
|
|
261
|
+
this.logMessage(e, {
|
|
262
|
+
logLevel: a.Verbose,
|
|
263
|
+
containsPii: !1,
|
|
264
|
+
correlationId: s
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
/**
|
|
268
|
+
* Logs verbose messages with PII.
|
|
269
|
+
*/
|
|
270
|
+
verbosePii(e, s) {
|
|
271
|
+
this.logMessage(e, {
|
|
272
|
+
logLevel: a.Verbose,
|
|
273
|
+
containsPii: !0,
|
|
274
|
+
correlationId: s
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* Logs trace messages.
|
|
279
|
+
*/
|
|
280
|
+
trace(e, s) {
|
|
281
|
+
this.logMessage(e, {
|
|
282
|
+
logLevel: a.Trace,
|
|
283
|
+
containsPii: !1,
|
|
284
|
+
correlationId: s
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* Logs trace messages with PII.
|
|
289
|
+
*/
|
|
290
|
+
tracePii(e, s) {
|
|
291
|
+
this.logMessage(e, {
|
|
292
|
+
logLevel: a.Trace,
|
|
293
|
+
containsPii: !0,
|
|
294
|
+
correlationId: s
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* Returns whether PII Logging is enabled or not.
|
|
299
|
+
*/
|
|
300
|
+
isPiiLoggingEnabled() {
|
|
301
|
+
return this.piiLoggingEnabled || !1;
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
/*! @azure/msal-common v16.6.0 2026-05-07 */
|
|
305
|
+
const as = "no_tokens_found", ns = "native_account_unavailable", rs = "refresh_token_expired", H = "ux_not_allowed", F = "interaction_required", b = "consent_required", v = "login_required", G = "bad_token", V = "interrupted_user";
|
|
306
|
+
/*! @azure/msal-common v16.6.0 2026-05-07 */
|
|
307
|
+
const O = [
|
|
308
|
+
F,
|
|
309
|
+
b,
|
|
310
|
+
v,
|
|
311
|
+
G,
|
|
312
|
+
H,
|
|
313
|
+
V
|
|
314
|
+
], w = [
|
|
315
|
+
"message_only",
|
|
316
|
+
"additional_action",
|
|
317
|
+
"basic_action",
|
|
318
|
+
"user_password_expired",
|
|
319
|
+
"consent_required",
|
|
320
|
+
"bad_token",
|
|
321
|
+
"ux_not_allowed",
|
|
322
|
+
"interrupted_user"
|
|
323
|
+
];
|
|
324
|
+
class A extends E {
|
|
325
|
+
constructor(e, s, o, n, r, c, _, T) {
|
|
326
|
+
super(e, s, o), Object.setPrototypeOf(this, A.prototype), this.timestamp = n || "", this.traceId = r || "", this.correlationId = c || "", this.claims = _ || "", this.name = "InteractionRequiredAuthError", this.errorNo = T;
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
function is(t, e, s) {
|
|
330
|
+
const o = !!t && O.indexOf(t) > -1, n = !!s && w.indexOf(s) > -1, r = !!e && O.some((c) => e.indexOf(c) > -1);
|
|
331
|
+
return o || r || n;
|
|
332
|
+
}
|
|
333
|
+
function Es(t, e) {
|
|
334
|
+
return new A(t, e);
|
|
335
|
+
}
|
|
336
|
+
/*! @azure/msal-browser v5.10.0 2026-05-07 */
|
|
337
|
+
function g(t) {
|
|
338
|
+
return `See https://aka.ms/msal.js.errors#${t} for details`;
|
|
339
|
+
}
|
|
340
|
+
class S extends E {
|
|
341
|
+
constructor(e, s) {
|
|
342
|
+
super(e, g(e), s), Object.setPrototypeOf(this, S.prototype), this.name = "BrowserAuthError";
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
function cs(t, e) {
|
|
346
|
+
return new S(t, e);
|
|
347
|
+
}
|
|
348
|
+
/*! @azure/msal-browser v5.10.0 2026-05-07 */
|
|
349
|
+
const _s = {
|
|
350
|
+
/**
|
|
351
|
+
* Invalid grant error code
|
|
352
|
+
*/
|
|
353
|
+
INVALID_GRANT_ERROR: "invalid_grant",
|
|
354
|
+
/**
|
|
355
|
+
* Default popup window width
|
|
356
|
+
*/
|
|
357
|
+
POPUP_WIDTH: 483,
|
|
358
|
+
/**
|
|
359
|
+
* Default popup window height
|
|
360
|
+
*/
|
|
361
|
+
POPUP_HEIGHT: 600,
|
|
362
|
+
/**
|
|
363
|
+
* Name of the popup window starts with
|
|
364
|
+
*/
|
|
365
|
+
POPUP_NAME_PREFIX: "msal",
|
|
366
|
+
/**
|
|
367
|
+
* Msal-browser SKU
|
|
368
|
+
*/
|
|
369
|
+
MSAL_SKU: "msal.js.browser"
|
|
370
|
+
}, Ts = {
|
|
371
|
+
CHANNEL_ID: "53ee284d-920a-4b59-9d30-a60315b26836",
|
|
372
|
+
PREFERRED_EXTENSION_ID: "ppnbnpeolgkicgegkbkbjmhlideopiji",
|
|
373
|
+
MATS_TELEMETRY: "MATS",
|
|
374
|
+
MICROSOFT_ENTRA_BROKERID: "MicrosoftEntra",
|
|
375
|
+
DOM_API_NAME: "DOM API",
|
|
376
|
+
PLATFORM_DOM_APIS: "get-token-and-sign-out",
|
|
377
|
+
PLATFORM_DOM_PROVIDER: "PlatformAuthDOMHandler",
|
|
378
|
+
PLATFORM_EXTENSION_PROVIDER: "PlatformAuthExtensionHandler"
|
|
379
|
+
}, ls = {
|
|
380
|
+
HandshakeRequest: "Handshake",
|
|
381
|
+
HandshakeResponse: "HandshakeResponse",
|
|
382
|
+
GetToken: "GetToken",
|
|
383
|
+
Response: "Response"
|
|
384
|
+
}, Rs = {
|
|
385
|
+
LocalStorage: "localStorage",
|
|
386
|
+
SessionStorage: "sessionStorage",
|
|
387
|
+
MemoryStorage: "memoryStorage"
|
|
388
|
+
}, As = {
|
|
389
|
+
GET: "GET",
|
|
390
|
+
POST: "POST"
|
|
391
|
+
}, Ss = {
|
|
392
|
+
SIGNIN: "signin",
|
|
393
|
+
SIGNOUT: "signout"
|
|
394
|
+
}, us = {
|
|
395
|
+
ORIGIN_URI: "request.origin",
|
|
396
|
+
URL_HASH: "urlHash",
|
|
397
|
+
REQUEST_PARAMS: "request.params",
|
|
398
|
+
VERIFIER: "code.verifier",
|
|
399
|
+
INTERACTION_STATUS_KEY: "interaction.status",
|
|
400
|
+
NATIVE_REQUEST: "request.native"
|
|
401
|
+
}, Os = {
|
|
402
|
+
WRAPPER_SKU: "wrapper.sku",
|
|
403
|
+
WRAPPER_VER: "wrapper.version"
|
|
404
|
+
}, Cs = {
|
|
405
|
+
acquireTokenRedirect: 861,
|
|
406
|
+
acquireTokenPopup: 862,
|
|
407
|
+
ssoSilent: 863,
|
|
408
|
+
acquireTokenSilent_authCode: 864,
|
|
409
|
+
handleRedirectPromise: 865,
|
|
410
|
+
acquireTokenByCode: 866,
|
|
411
|
+
acquireTokenSilent_silentFlow: 61,
|
|
412
|
+
logout: 961,
|
|
413
|
+
logoutPopup: 962,
|
|
414
|
+
hydrateCache: 963,
|
|
415
|
+
loadExternalTokens: 964
|
|
416
|
+
}, C = {
|
|
417
|
+
861: "acquireTokenRedirect",
|
|
418
|
+
862: "acquireTokenPopup",
|
|
419
|
+
863: "ssoSilent",
|
|
420
|
+
864: "acquireTokenSilent_authCode",
|
|
421
|
+
865: "handleRedirectPromise",
|
|
422
|
+
866: "acquireTokenByCode",
|
|
423
|
+
61: "acquireTokenSilent_silentFlow",
|
|
424
|
+
961: "logout",
|
|
425
|
+
962: "logoutPopup",
|
|
426
|
+
963: "hydrateCache",
|
|
427
|
+
964: "loadExternalTokens"
|
|
428
|
+
}, Is = (t) => typeof t == "number" && t in C ? C[t] : "unknown";
|
|
429
|
+
var I;
|
|
430
|
+
(function(t) {
|
|
431
|
+
t.Redirect = "redirect", t.Popup = "popup", t.Silent = "silent", t.None = "none";
|
|
432
|
+
})(I || (I = {}));
|
|
433
|
+
const Ns = {
|
|
434
|
+
/**
|
|
435
|
+
* Initial status before interaction occurs
|
|
436
|
+
*/
|
|
437
|
+
Startup: "startup",
|
|
438
|
+
/**
|
|
439
|
+
* Status set when logout call occuring
|
|
440
|
+
*/
|
|
441
|
+
Logout: "logout",
|
|
442
|
+
/**
|
|
443
|
+
* Status set for acquireToken calls
|
|
444
|
+
*/
|
|
445
|
+
AcquireToken: "acquireToken",
|
|
446
|
+
/**
|
|
447
|
+
* Status set when handleRedirect in progress
|
|
448
|
+
*/
|
|
449
|
+
HandleRedirect: "handleRedirect",
|
|
450
|
+
/**
|
|
451
|
+
* Status set when interaction is complete
|
|
452
|
+
*/
|
|
453
|
+
None: "none"
|
|
454
|
+
}, ds = {
|
|
455
|
+
scopes: N
|
|
456
|
+
}, gs = "jwk", hs = {
|
|
457
|
+
React: "@azure/msal-react",
|
|
458
|
+
Angular: "@azure/msal-angular"
|
|
459
|
+
}, y = "msal.db", ps = 1, ms = `${y}.keys`, l = {
|
|
460
|
+
/*
|
|
461
|
+
* acquireTokenSilent will attempt to retrieve an access token from the cache. If the access token is expired
|
|
462
|
+
* or cannot be found the refresh token will be used to acquire a new one. Finally, if the refresh token
|
|
463
|
+
* is expired acquireTokenSilent will attempt to acquire new access and refresh tokens.
|
|
464
|
+
*/
|
|
465
|
+
Default: 0,
|
|
466
|
+
/*
|
|
467
|
+
* acquireTokenSilent will only look for access tokens in the cache. It will not attempt to renew access or
|
|
468
|
+
* refresh tokens.
|
|
469
|
+
*/
|
|
470
|
+
AccessToken: 1,
|
|
471
|
+
/*
|
|
472
|
+
* acquireTokenSilent will attempt to retrieve an access token from the cache. If the access token is expired or
|
|
473
|
+
* cannot be found, the refresh token will be used to acquire a new one. If the refresh token is expired, it
|
|
474
|
+
* will not be renewed and acquireTokenSilent will fail.
|
|
475
|
+
*/
|
|
476
|
+
AccessTokenAndRefreshToken: 2,
|
|
477
|
+
/*
|
|
478
|
+
* acquireTokenSilent will not attempt to retrieve access tokens from the cache and will instead attempt to
|
|
479
|
+
* exchange the cached refresh token for a new access token. If the refresh token is expired, it will not be
|
|
480
|
+
* renewed and acquireTokenSilent will fail.
|
|
481
|
+
*/
|
|
482
|
+
RefreshToken: 3,
|
|
483
|
+
/*
|
|
484
|
+
* acquireTokenSilent will not look in the cache for the access token. It will go directly to network with the
|
|
485
|
+
* cached refresh token. If the refresh token is expired an attempt will be made to renew it. This is equivalent to
|
|
486
|
+
* setting "forceRefresh: true".
|
|
487
|
+
*/
|
|
488
|
+
RefreshTokenAndNetwork: 4,
|
|
489
|
+
/*
|
|
490
|
+
* acquireTokenSilent will attempt to renew both access and refresh tokens. It will not look in the cache. This will
|
|
491
|
+
* always fail if 3rd party cookies are blocked by the browser.
|
|
492
|
+
*/
|
|
493
|
+
Skip: 5
|
|
494
|
+
}, Ds = [
|
|
495
|
+
l.Default,
|
|
496
|
+
l.Skip,
|
|
497
|
+
l.RefreshTokenAndNetwork
|
|
498
|
+
];
|
|
499
|
+
/*! @azure/msal-browser v5.10.0 2026-05-07 */
|
|
500
|
+
class u extends E {
|
|
501
|
+
constructor(e, s) {
|
|
502
|
+
super(e, s), this.name = "BrowserConfigurationAuthError", Object.setPrototypeOf(this, u.prototype);
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
function Ps(t) {
|
|
506
|
+
return new u(t, g(t));
|
|
507
|
+
}
|
|
508
|
+
/*! @azure/msal-browser v5.10.0 2026-05-07 */
|
|
509
|
+
const Ls = "storage_not_supported", fs = "stubbed_public_client_application_called", Ms = "in_mem_redirect_unavailable";
|
|
510
|
+
/*! @azure/msal-browser v5.10.0 2026-05-07 */
|
|
511
|
+
const Us = {
|
|
512
|
+
INITIALIZE_START: "msal:initializeStart",
|
|
513
|
+
INITIALIZE_END: "msal:initializeEnd",
|
|
514
|
+
ACTIVE_ACCOUNT_CHANGED: "msal:activeAccountChanged",
|
|
515
|
+
LOGIN_SUCCESS: "msal:loginSuccess",
|
|
516
|
+
ACQUIRE_TOKEN_START: "msal:acquireTokenStart",
|
|
517
|
+
BROKERED_REQUEST_START: "msal:brokeredRequestStart",
|
|
518
|
+
ACQUIRE_TOKEN_SUCCESS: "msal:acquireTokenSuccess",
|
|
519
|
+
BROKERED_REQUEST_SUCCESS: "msal:brokeredRequestSuccess",
|
|
520
|
+
ACQUIRE_TOKEN_FAILURE: "msal:acquireTokenFailure",
|
|
521
|
+
BROKERED_REQUEST_FAILURE: "msal:brokeredRequestFailure",
|
|
522
|
+
ACQUIRE_TOKEN_NETWORK_START: "msal:acquireTokenFromNetworkStart",
|
|
523
|
+
HANDLE_REDIRECT_START: "msal:handleRedirectStart",
|
|
524
|
+
HANDLE_REDIRECT_END: "msal:handleRedirectEnd",
|
|
525
|
+
POPUP_OPENED: "msal:popupOpened",
|
|
526
|
+
LOGOUT_START: "msal:logoutStart",
|
|
527
|
+
LOGOUT_SUCCESS: "msal:logoutSuccess",
|
|
528
|
+
LOGOUT_FAILURE: "msal:logoutFailure",
|
|
529
|
+
LOGOUT_END: "msal:logoutEnd",
|
|
530
|
+
RESTORE_FROM_BFCACHE: "msal:restoreFromBFCache",
|
|
531
|
+
BROKER_CONNECTION_ESTABLISHED: "msal:brokerConnectionEstablished"
|
|
532
|
+
};
|
|
533
|
+
export {
|
|
534
|
+
Q as $,
|
|
535
|
+
E as A,
|
|
536
|
+
ce as B,
|
|
537
|
+
Ie as C,
|
|
538
|
+
ts as D,
|
|
539
|
+
Us as E,
|
|
540
|
+
Z as F,
|
|
541
|
+
Te as G,
|
|
542
|
+
ue as H,
|
|
543
|
+
I,
|
|
544
|
+
is as J,
|
|
545
|
+
xe as K,
|
|
546
|
+
R as L,
|
|
547
|
+
Qe as M,
|
|
548
|
+
J as N,
|
|
549
|
+
N as O,
|
|
550
|
+
se as P,
|
|
551
|
+
Ee as Q,
|
|
552
|
+
ge as R,
|
|
553
|
+
K as S,
|
|
554
|
+
ke as T,
|
|
555
|
+
z as U,
|
|
556
|
+
Je as V,
|
|
557
|
+
hs as W,
|
|
558
|
+
$e as X,
|
|
559
|
+
_e as Y,
|
|
560
|
+
ee as Z,
|
|
561
|
+
te as _,
|
|
562
|
+
Ns as a,
|
|
563
|
+
Y as a0,
|
|
564
|
+
W as a1,
|
|
565
|
+
be as a2,
|
|
566
|
+
oe as a3,
|
|
567
|
+
Ze as a4,
|
|
568
|
+
x as a5,
|
|
569
|
+
ie as a6,
|
|
570
|
+
q as a7,
|
|
571
|
+
ne as a8,
|
|
572
|
+
ae as a9,
|
|
573
|
+
S as aA,
|
|
574
|
+
Ls as aB,
|
|
575
|
+
Is as aC,
|
|
576
|
+
Os as aD,
|
|
577
|
+
Oe as aE,
|
|
578
|
+
us as aF,
|
|
579
|
+
Ss as aG,
|
|
580
|
+
Cs as aH,
|
|
581
|
+
_s as aI,
|
|
582
|
+
Ae as aJ,
|
|
583
|
+
g as aK,
|
|
584
|
+
H as aL,
|
|
585
|
+
ns as aM,
|
|
586
|
+
l as aN,
|
|
587
|
+
re as aO,
|
|
588
|
+
Ts as aP,
|
|
589
|
+
j as aQ,
|
|
590
|
+
de as aR,
|
|
591
|
+
As as aS,
|
|
592
|
+
h as aT,
|
|
593
|
+
p as aU,
|
|
594
|
+
m as aV,
|
|
595
|
+
ls as aW,
|
|
596
|
+
os as aX,
|
|
597
|
+
ds as aY,
|
|
598
|
+
Ds as aZ,
|
|
599
|
+
X as aa,
|
|
600
|
+
he as ab,
|
|
601
|
+
as as ac,
|
|
602
|
+
je as ad,
|
|
603
|
+
ze as ae,
|
|
604
|
+
Es as af,
|
|
605
|
+
G as ag,
|
|
606
|
+
rs as ah,
|
|
607
|
+
es as ai,
|
|
608
|
+
Ne as aj,
|
|
609
|
+
Ke as ak,
|
|
610
|
+
ve as al,
|
|
611
|
+
ye as am,
|
|
612
|
+
Ve as an,
|
|
613
|
+
We as ao,
|
|
614
|
+
Ge as ap,
|
|
615
|
+
qe as aq,
|
|
616
|
+
Be as ar,
|
|
617
|
+
ss as as,
|
|
618
|
+
cs as at,
|
|
619
|
+
gs as au,
|
|
620
|
+
Rs as av,
|
|
621
|
+
Ms as aw,
|
|
622
|
+
y as ax,
|
|
623
|
+
ps as ay,
|
|
624
|
+
ms as az,
|
|
625
|
+
A as b,
|
|
626
|
+
Ps as c,
|
|
627
|
+
D as d,
|
|
628
|
+
Se as e,
|
|
629
|
+
Ue as f,
|
|
630
|
+
Ye as g,
|
|
631
|
+
Ce as h,
|
|
632
|
+
d as i,
|
|
633
|
+
Le as j,
|
|
634
|
+
De as k,
|
|
635
|
+
me as l,
|
|
636
|
+
pe as m,
|
|
637
|
+
fe as n,
|
|
638
|
+
Me as o,
|
|
639
|
+
He as p,
|
|
640
|
+
a as q,
|
|
641
|
+
B as r,
|
|
642
|
+
fs as s,
|
|
643
|
+
we as t,
|
|
644
|
+
Xe as u,
|
|
645
|
+
Pe as v,
|
|
646
|
+
Fe as w,
|
|
647
|
+
$ as x,
|
|
648
|
+
le as y,
|
|
649
|
+
Re as z
|
|
650
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { IPublicClientApplication, AccountInfo } from '@azure/msal-browser';
|
|
3
|
+
export interface AuthContextValue {
|
|
4
|
+
/** The currently authenticated account, or null if not logged in */
|
|
5
|
+
account: AccountInfo | null;
|
|
6
|
+
/** Whether a user is currently authenticated */
|
|
7
|
+
isAuthenticated: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* True while any auth interaction is in progress (startup, redirect, token
|
|
10
|
+
* acquisition). Use this to block UI until auth state is settled.
|
|
11
|
+
*/
|
|
12
|
+
isLoading: boolean;
|
|
13
|
+
/** App roles assigned to the current user, sourced from the ID token claims. Empty array if not authenticated. */
|
|
14
|
+
roles: string[];
|
|
15
|
+
/** Returns true if the current user has the specified app role. */
|
|
16
|
+
hasRole: (role: string) => boolean;
|
|
17
|
+
/** Initiates Microsoft login via redirect */
|
|
18
|
+
login: () => void;
|
|
19
|
+
/** Logs out the current user via redirect */
|
|
20
|
+
logout: () => void;
|
|
21
|
+
/**
|
|
22
|
+
* Silently acquires an access token. Falls back to redirect if interaction
|
|
23
|
+
* is required (e.g. token expired, consent needed).
|
|
24
|
+
* This is the standard MSAL "silent first, interactive as fallback" pattern.
|
|
25
|
+
* @param scopes - Override scopes. Defaults to the configured apiScope.
|
|
26
|
+
*/
|
|
27
|
+
acquireToken: (scopes?: string[]) => Promise<string>;
|
|
28
|
+
}
|
|
29
|
+
/** Exported so tests and Storybook can mock the auth context directly. */
|
|
30
|
+
export declare const AuthContext: import('react').Context<AuthContextValue | null>;
|
|
31
|
+
export interface AuthProviderProps {
|
|
32
|
+
/** PublicClientApplication created by createMsalInstance() */
|
|
33
|
+
msalInstance: IPublicClientApplication;
|
|
34
|
+
/**
|
|
35
|
+
* The API scope URI used for token acquisition and login consent.
|
|
36
|
+
* Example: "api://<clientId>/access_as_user"
|
|
37
|
+
*/
|
|
38
|
+
apiScope: string;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Wrap your application root with AuthProvider to enable Microsoft Identity
|
|
42
|
+
* Platform authentication for all child components.
|
|
43
|
+
*
|
|
44
|
+
* ```tsx
|
|
45
|
+
* import { AuthProvider, createMsalInstance } from 'jcicl/AuthContext';
|
|
46
|
+
*
|
|
47
|
+
* const msalInstance = createMsalInstance({
|
|
48
|
+
* clientId: import.meta.env.VITE_AZURE_CLIENT_ID,
|
|
49
|
+
* tenantId: import.meta.env.VITE_AZURE_TENANT_ID,
|
|
50
|
+
* apiScope: import.meta.env.VITE_API_SCOPE,
|
|
51
|
+
* });
|
|
52
|
+
*
|
|
53
|
+
* <AuthProvider msalInstance={msalInstance} apiScope={import.meta.env.VITE_API_SCOPE}>
|
|
54
|
+
* <App />
|
|
55
|
+
* </AuthProvider>
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
export declare function AuthProvider({ msalInstance, apiScope, children }: PropsWithChildren<AuthProviderProps>): import("react/jsx-runtime").JSX.Element;
|
|
59
|
+
/**
|
|
60
|
+
* Hook to access the current auth state and actions.
|
|
61
|
+
* Must be rendered inside AuthProvider.
|
|
62
|
+
*/
|
|
63
|
+
export declare function useAuthContext(): AuthContextValue;
|