@multiplatform.one/keycloak 0.7.1 → 0.7.2

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.
Files changed (101) hide show
  1. package/lib/@types/coreJsPure.d.d.ts +2 -0
  2. package/lib/@types/coreJsPure.d.js +1 -0
  3. package/lib/@types/coreJsPure.d.mjs +0 -0
  4. package/lib/@types/expoKeycloakAuth.d.d.ts +28 -0
  5. package/lib/@types/expoKeycloakAuth.d.js +1 -0
  6. package/lib/@types/expoKeycloakAuth.d.mjs +0 -0
  7. package/lib/Authenticated.d.ts +36 -0
  8. package/lib/Authenticated.js +19 -0
  9. package/lib/Authenticated.mjs +20 -0
  10. package/lib/authConfig.d.ts +37 -0
  11. package/lib/authConfig.js +8 -0
  12. package/lib/authConfig.mjs +9 -0
  13. package/lib/chunk-2GUOEPFY.mjs +0 -0
  14. package/lib/chunk-3ZPHNEJL.js +11 -0
  15. package/lib/chunk-64PPU7Q3.mjs +13 -0
  16. package/lib/chunk-6NDWOV55.js +1 -0
  17. package/lib/chunk-6QZDLO3M.mjs +41 -0
  18. package/lib/chunk-73FF4BX7.js +78 -0
  19. package/lib/chunk-7MTPH6XK.mjs +26 -0
  20. package/lib/chunk-A7UBOIAL.js +13 -0
  21. package/lib/chunk-AD6VPMID.mjs +20 -0
  22. package/lib/chunk-AYKQVWMR.mjs +0 -0
  23. package/lib/chunk-BTHRDOLL.mjs +84 -0
  24. package/lib/chunk-C2FNSVJO.js +17 -0
  25. package/lib/chunk-CLO6HIJN.mjs +52 -0
  26. package/lib/chunk-DJW5IKQS.mjs +265 -0
  27. package/lib/chunk-JLIMB5OD.js +56 -0
  28. package/lib/chunk-JYEIPNPN.mjs +76 -0
  29. package/lib/chunk-K2MQYDVB.mjs +50 -0
  30. package/lib/chunk-KLLABHIC.js +13 -0
  31. package/lib/chunk-L5HMOY4M.mjs +18 -0
  32. package/lib/chunk-NHABU752.mjs +10 -0
  33. package/lib/chunk-NRD376XV.js +33 -0
  34. package/lib/chunk-NWRANDZ6.js +98 -0
  35. package/lib/chunk-NXTVYIBR.mjs +11 -0
  36. package/lib/chunk-OYWAYMFN.js +17 -0
  37. package/lib/chunk-QFP2JWHZ.js +443 -0
  38. package/lib/chunk-RTZ3CZKS.js +161 -0
  39. package/lib/chunk-S3M2DZ6G.js +460 -0
  40. package/lib/chunk-UBVYEZI3.js +1 -0
  41. package/lib/chunk-UOKDJT5L.mjs +16 -0
  42. package/lib/chunk-XXPGZHWZ.js +22 -0
  43. package/lib/chunk-Y4XMF3R6.mjs +13 -0
  44. package/lib/chunk-YGNNHTFE.js +12 -0
  45. package/lib/hooks/index.d.ts +9 -0
  46. package/lib/hooks/index.js +23 -0
  47. package/lib/hooks/index.mjs +34 -0
  48. package/lib/hooks/useAuthConfig.d.ts +29 -0
  49. package/lib/hooks/useAuthConfig.js +8 -0
  50. package/lib/hooks/useAuthConfig.mjs +8 -0
  51. package/lib/hooks/useCurrentRouteName/index.d.ts +26 -0
  52. package/lib/hooks/useCurrentRouteName/index.js +7 -0
  53. package/lib/hooks/useCurrentRouteName/index.mjs +7 -0
  54. package/lib/hooks/useCurrentRouteName/index.native.d.ts +26 -0
  55. package/lib/hooks/useCurrentRouteName/index.native.js +14 -0
  56. package/lib/hooks/useCurrentRouteName/index.native.mjs +14 -0
  57. package/lib/hooks/useKeycloak/index.d.ts +70 -0
  58. package/lib/hooks/useKeycloak/index.js +11 -0
  59. package/lib/hooks/useKeycloak/index.mjs +12 -0
  60. package/lib/hooks/useKeycloak/useKeycloak.d.ts +2 -0
  61. package/lib/hooks/useKeycloak/useKeycloak.js +10 -0
  62. package/lib/hooks/useKeycloak/useKeycloak.mjs +11 -0
  63. package/lib/hooks/useKeycloak/useKeycloak.native.d.ts +44 -0
  64. package/lib/hooks/useKeycloak/useKeycloak.native.js +80 -0
  65. package/lib/hooks/useKeycloak/useKeycloak.native.mjs +69 -0
  66. package/lib/hooks/useLogin.d.ts +26 -0
  67. package/lib/hooks/useLogin.js +11 -0
  68. package/lib/hooks/useLogin.mjs +11 -0
  69. package/lib/hooks/useTokensFromQuery/index.d.ts +26 -0
  70. package/lib/hooks/useTokensFromQuery/index.js +7 -0
  71. package/lib/hooks/useTokensFromQuery/index.mjs +7 -0
  72. package/lib/hooks/useTokensFromQuery/index.native.d.ts +26 -0
  73. package/lib/hooks/useTokensFromQuery/index.native.js +10 -0
  74. package/lib/hooks/useTokensFromQuery/index.native.mjs +7 -0
  75. package/lib/hooks/useTokensFromState.d.ts +26 -0
  76. package/lib/hooks/useTokensFromState.js +9 -0
  77. package/lib/hooks/useTokensFromState.mjs +9 -0
  78. package/lib/index.d.ts +13 -0
  79. package/lib/index.mjs +56 -0
  80. package/lib/provider/afterAuth.d.ts +32 -0
  81. package/lib/provider/afterAuth.js +18 -0
  82. package/lib/provider/afterAuth.mjs +18 -0
  83. package/lib/provider/index.d.ts +42 -0
  84. package/lib/provider/index.js +22 -0
  85. package/lib/provider/index.mjs +25 -0
  86. package/lib/provider/keycloakProvider.d.ts +45 -0
  87. package/lib/provider/keycloakProvider.js +20 -0
  88. package/lib/provider/keycloakProvider.mjs +21 -0
  89. package/lib/provider/keycloakProvider.native.d.ts +32 -0
  90. package/lib/provider/keycloakProvider.native.js +87 -0
  91. package/lib/provider/keycloakProvider.native.mjs +30 -0
  92. package/lib/state/index.d.ts +34 -0
  93. package/lib/state/index.js +7 -0
  94. package/lib/state/index.mjs +7 -0
  95. package/lib/types.d.ts +40 -0
  96. package/lib/types.js +8 -0
  97. package/lib/types.mjs +7 -0
  98. package/lib/util.d.ts +27 -0
  99. package/lib/util.js +8 -0
  100. package/lib/util.mjs +9 -0
  101. package/package.json +6 -6
@@ -0,0 +1,460 @@
1
+ "use strict";
2
+ function _array_like_to_array(arr, len) {
3
+ if (len == null || len > arr.length) len = arr.length;
4
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
5
+ return arr2;
6
+ }
7
+ function _array_without_holes(arr) {
8
+ if (Array.isArray(arr)) return _array_like_to_array(arr);
9
+ }
10
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
11
+ try {
12
+ var info = gen[key](arg);
13
+ var value = info.value;
14
+ } catch (error) {
15
+ reject(error);
16
+ return;
17
+ }
18
+ if (info.done) {
19
+ resolve(value);
20
+ } else {
21
+ Promise.resolve(value).then(_next, _throw);
22
+ }
23
+ }
24
+ function _async_to_generator(fn) {
25
+ return function() {
26
+ var self = this, args = arguments;
27
+ return new Promise(function(resolve, reject) {
28
+ var gen = fn.apply(self, args);
29
+ function _next(value) {
30
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
31
+ }
32
+ function _throw(err) {
33
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
34
+ }
35
+ _next(undefined);
36
+ });
37
+ };
38
+ }
39
+ function _class_call_check(instance, Constructor) {
40
+ if (!(instance instanceof Constructor)) {
41
+ throw new TypeError("Cannot call a class as a function");
42
+ }
43
+ }
44
+ function _defineProperties(target, props) {
45
+ for(var i = 0; i < props.length; i++){
46
+ var descriptor = props[i];
47
+ descriptor.enumerable = descriptor.enumerable || false;
48
+ descriptor.configurable = true;
49
+ if ("value" in descriptor) descriptor.writable = true;
50
+ Object.defineProperty(target, descriptor.key, descriptor);
51
+ }
52
+ }
53
+ function _create_class(Constructor, protoProps, staticProps) {
54
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
55
+ if (staticProps) _defineProperties(Constructor, staticProps);
56
+ return Constructor;
57
+ }
58
+ function _iterable_to_array(iter) {
59
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
60
+ }
61
+ function _non_iterable_spread() {
62
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
63
+ }
64
+ function _to_consumable_array(arr) {
65
+ return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
66
+ }
67
+ function _unsupported_iterable_to_array(o, minLen) {
68
+ if (!o) return;
69
+ if (typeof o === "string") return _array_like_to_array(o, minLen);
70
+ var n = Object.prototype.toString.call(o).slice(8, -1);
71
+ if (n === "Object" && o.constructor) n = o.constructor.name;
72
+ if (n === "Map" || n === "Set") return Array.from(n);
73
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
74
+ }
75
+ function _ts_generator(thisArg, body) {
76
+ var f, y, t, g, _ = {
77
+ label: 0,
78
+ sent: function() {
79
+ if (t[0] & 1) throw t[1];
80
+ return t[1];
81
+ },
82
+ trys: [],
83
+ ops: []
84
+ };
85
+ return g = {
86
+ next: verb(0),
87
+ "throw": verb(1),
88
+ "return": verb(2)
89
+ }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
90
+ return this;
91
+ }), g;
92
+ function verb(n) {
93
+ return function(v) {
94
+ return step([
95
+ n,
96
+ v
97
+ ]);
98
+ };
99
+ }
100
+ function step(op) {
101
+ if (f) throw new TypeError("Generator is already executing.");
102
+ while(_)try {
103
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
104
+ if (y = 0, t) op = [
105
+ op[0] & 2,
106
+ t.value
107
+ ];
108
+ switch(op[0]){
109
+ case 0:
110
+ case 1:
111
+ t = op;
112
+ break;
113
+ case 4:
114
+ _.label++;
115
+ return {
116
+ value: op[1],
117
+ done: false
118
+ };
119
+ case 5:
120
+ _.label++;
121
+ y = op[1];
122
+ op = [
123
+ 0
124
+ ];
125
+ continue;
126
+ case 7:
127
+ op = _.ops.pop();
128
+ _.trys.pop();
129
+ continue;
130
+ default:
131
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
132
+ _ = 0;
133
+ continue;
134
+ }
135
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
136
+ _.label = op[1];
137
+ break;
138
+ }
139
+ if (op[0] === 6 && _.label < t[1]) {
140
+ _.label = t[1];
141
+ t = op;
142
+ break;
143
+ }
144
+ if (t && _.label < t[2]) {
145
+ _.label = t[2];
146
+ _.ops.push(op);
147
+ break;
148
+ }
149
+ if (t[2]) _.ops.pop();
150
+ _.trys.pop();
151
+ continue;
152
+ }
153
+ op = body.call(thisArg, _);
154
+ } catch (e) {
155
+ op = [
156
+ 6,
157
+ e
158
+ ];
159
+ y = 0;
160
+ } finally{
161
+ f = t = 0;
162
+ }
163
+ if (op[0] & 5) throw op[1];
164
+ return {
165
+ value: op[0] ? op[1] : void 0,
166
+ done: true
167
+ };
168
+ }
169
+ }
170
+ Object.defineProperty(exports, "__esModule", {
171
+ value: true
172
+ });
173
+ function _optionalChain(ops) {
174
+ var lastAccessLHS = undefined;
175
+ var value = ops[0];
176
+ var i = 1;
177
+ while(i < ops.length){
178
+ var op = ops[i];
179
+ var fn = ops[i + 1];
180
+ i += 2;
181
+ if ((op === "optionalAccess" || op === "optionalCall") && value == null) {
182
+ return undefined;
183
+ }
184
+ if (op === "access" || op === "optionalAccess") {
185
+ lastAccessLHS = value;
186
+ value = fn(value);
187
+ } else if (op === "call" || op === "optionalCall") {
188
+ var _value;
189
+ value = fn(function() {
190
+ for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
191
+ args[_key] = arguments[_key];
192
+ }
193
+ return (_value = value).call.apply(_value, [
194
+ lastAccessLHS
195
+ ].concat(_to_consumable_array(args)));
196
+ });
197
+ lastAccessLHS = undefined;
198
+ }
199
+ }
200
+ return value;
201
+ }
202
+ var _chunk3ZPHNEJLjs = require("./chunk-3ZPHNEJL.js");
203
+ var _chunkXXPGZHWZjs = require("./chunk-XXPGZHWZ.js");
204
+ // src/hooks/useKeycloak/useKeycloak.ts
205
+ var _multiplatformone = require("multiplatform.one");
206
+ var _reactkeycloakweb = require("@bitspur/react-keycloak-web");
207
+ var _reactkeycloakssr = require("@bitspur/react-keycloak-ssr");
208
+ function useKeycloak() {
209
+ var authConfig = _chunk3ZPHNEJLjs.useAuthConfig.call(void 0);
210
+ if (_multiplatformone.MultiPlatform.isStorybook) {
211
+ return new Keycloak({
212
+ email: "storybook@example.com",
213
+ login: /*#__PURE__*/ _async_to_generator(function() {
214
+ return _ts_generator(this, function(_state) {
215
+ return [
216
+ 2,
217
+ void 0
218
+ ];
219
+ });
220
+ }),
221
+ logout: /*#__PURE__*/ _async_to_generator(function() {
222
+ return _ts_generator(this, function(_state) {
223
+ return [
224
+ 2,
225
+ void 0
226
+ ];
227
+ });
228
+ }),
229
+ subject: "0",
230
+ username: "storybook"
231
+ }, true);
232
+ }
233
+ if (_multiplatformone.MultiPlatform.isNext && authConfig.ssr) {
234
+ var _reactkeycloakssr_useKeycloak_call = _reactkeycloakssr.useKeycloak.call(void 0), keycloak2 = _reactkeycloakssr_useKeycloak_call.keycloak, initialized2 = _reactkeycloakssr_useKeycloak_call.initialized;
235
+ return new Keycloak(keycloak2, initialized2);
236
+ }
237
+ var _reactkeycloakweb_useKeycloak_call = _reactkeycloakweb.useKeycloak.call(void 0), keycloak = _reactkeycloakweb_useKeycloak_call.keycloak, initialized = _reactkeycloakweb_useKeycloak_call.initialized;
238
+ return new Keycloak(keycloak, initialized);
239
+ }
240
+ var Keycloak = /*#__PURE__*/ function() {
241
+ function Keycloak(keycloak, initialized) {
242
+ _class_call_check(this, Keycloak);
243
+ this.keycloak = keycloak;
244
+ _chunkXXPGZHWZjs.__publicField.call(void 0, this, "authenticated");
245
+ this.authenticated = initialized ? _optionalChain([
246
+ keycloak,
247
+ "optionalAccess",
248
+ function(_) {
249
+ return _.authenticated;
250
+ }
251
+ ]) : void 0;
252
+ }
253
+ _create_class(Keycloak, [
254
+ {
255
+ key: "idToken",
256
+ get: function get() {
257
+ return _optionalChain([
258
+ this,
259
+ "access",
260
+ function(_2) {
261
+ return _2.keycloak;
262
+ },
263
+ "optionalAccess",
264
+ function(_3) {
265
+ return _3.idToken;
266
+ }
267
+ ]);
268
+ }
269
+ },
270
+ {
271
+ key: "realmAccess",
272
+ get: function get() {
273
+ return _optionalChain([
274
+ this,
275
+ "access",
276
+ function(_4) {
277
+ return _4.keycloak;
278
+ },
279
+ "optionalAccess",
280
+ function(_5) {
281
+ return _5.realmAccess;
282
+ }
283
+ ]);
284
+ }
285
+ },
286
+ {
287
+ key: "refreshToken",
288
+ get: function get() {
289
+ return _optionalChain([
290
+ this,
291
+ "access",
292
+ function(_6) {
293
+ return _6.keycloak;
294
+ },
295
+ "optionalAccess",
296
+ function(_7) {
297
+ return _7.refreshToken;
298
+ }
299
+ ]);
300
+ }
301
+ },
302
+ {
303
+ key: "refreshTokenParsed",
304
+ get: function get() {
305
+ return _optionalChain([
306
+ this,
307
+ "access",
308
+ function(_8) {
309
+ return _8.keycloak;
310
+ },
311
+ "optionalAccess",
312
+ function(_9) {
313
+ return _9.refreshTokenParsed;
314
+ }
315
+ ]);
316
+ }
317
+ },
318
+ {
319
+ key: "resourceAccess",
320
+ get: function get() {
321
+ return _optionalChain([
322
+ this,
323
+ "access",
324
+ function(_10) {
325
+ return _10.keycloak;
326
+ },
327
+ "optionalAccess",
328
+ function(_11) {
329
+ return _11.resourceAccess;
330
+ }
331
+ ]);
332
+ }
333
+ },
334
+ {
335
+ key: "subject",
336
+ get: function get() {
337
+ return _optionalChain([
338
+ this,
339
+ "access",
340
+ function(_12) {
341
+ return _12.keycloak;
342
+ },
343
+ "optionalAccess",
344
+ function(_13) {
345
+ return _13.subject;
346
+ }
347
+ ]);
348
+ }
349
+ },
350
+ {
351
+ key: "token",
352
+ get: function get() {
353
+ return _optionalChain([
354
+ this,
355
+ "access",
356
+ function(_14) {
357
+ return _14.keycloak;
358
+ },
359
+ "optionalAccess",
360
+ function(_15) {
361
+ return _15.token;
362
+ }
363
+ ]);
364
+ }
365
+ },
366
+ {
367
+ key: "tokenParsed",
368
+ get: function get() {
369
+ return _optionalChain([
370
+ this,
371
+ "access",
372
+ function(_16) {
373
+ return _16.keycloak;
374
+ },
375
+ "optionalAccess",
376
+ function(_17) {
377
+ return _17.tokenParsed;
378
+ }
379
+ ]);
380
+ }
381
+ },
382
+ {
383
+ key: "email",
384
+ get: function get() {
385
+ return _optionalChain([
386
+ this,
387
+ "access",
388
+ function(_18) {
389
+ return _18.keycloak;
390
+ },
391
+ "optionalAccess",
392
+ function(_19) {
393
+ return _19.tokenParsed;
394
+ },
395
+ "optionalAccess",
396
+ function(_20) {
397
+ return _20.email;
398
+ }
399
+ ]);
400
+ }
401
+ },
402
+ {
403
+ key: "username",
404
+ get: function get() {
405
+ return _optionalChain([
406
+ this,
407
+ "access",
408
+ function(_21) {
409
+ return _21.keycloak;
410
+ },
411
+ "optionalAccess",
412
+ function(_22) {
413
+ return _22.tokenParsed;
414
+ },
415
+ "optionalAccess",
416
+ function(_23) {
417
+ return _23.preferred_username;
418
+ }
419
+ ]);
420
+ }
421
+ },
422
+ {
423
+ key: "login",
424
+ value: function login() {
425
+ var _this = this;
426
+ return _async_to_generator(function() {
427
+ return _ts_generator(this, function(_state) {
428
+ if (!_this.keycloak) return [
429
+ 2
430
+ ];
431
+ return [
432
+ 2,
433
+ _this.keycloak.login()
434
+ ];
435
+ });
436
+ })();
437
+ }
438
+ },
439
+ {
440
+ key: "logout",
441
+ value: function logout() {
442
+ var _this = this;
443
+ return _async_to_generator(function() {
444
+ return _ts_generator(this, function(_state) {
445
+ if (!_this.keycloak) return [
446
+ 2
447
+ ];
448
+ return [
449
+ 2,
450
+ _this.keycloak.logout()
451
+ ];
452
+ });
453
+ })();
454
+ }
455
+ }
456
+ ]);
457
+ return Keycloak;
458
+ }();
459
+ exports.useKeycloak = useKeycloak;
460
+ exports.Keycloak = Keycloak;
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1,16 @@
1
+ import {
2
+ useAuthState
3
+ } from "./chunk-AD6VPMID.mjs";
4
+ import {
5
+ validToken
6
+ } from "./chunk-7MTPH6XK.mjs";
7
+
8
+ // src/hooks/useTokensFromState.ts
9
+ function useTokensFromState() {
10
+ const authState = useAuthState();
11
+ return !!validToken(authState.token, authState.refreshToken);
12
+ }
13
+
14
+ export {
15
+ useTokensFromState
16
+ };
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ function _type_of(obj) {
3
+ "@swc/helpers - typeof";
4
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
5
+ }
6
+ Object.defineProperty(exports, "__esModule", {
7
+ value: true
8
+ });
9
+ var __defProp = Object.defineProperty;
10
+ var __defNormalProp = function(obj, key, value) {
11
+ return key in obj ? __defProp(obj, key, {
12
+ enumerable: true,
13
+ configurable: true,
14
+ writable: true,
15
+ value: value
16
+ }) : obj[key] = value;
17
+ };
18
+ var __publicField = function(obj, key, value) {
19
+ __defNormalProp(obj, (typeof key === "undefined" ? "undefined" : _type_of(key)) !== "symbol" ? key + "" : key, value);
20
+ return value;
21
+ };
22
+ exports.__publicField = __publicField;
@@ -0,0 +1,13 @@
1
+ import {
2
+ AuthConfigContext
3
+ } from "./chunk-64PPU7Q3.mjs";
4
+
5
+ // src/hooks/useAuthConfig.ts
6
+ import { useContext } from "react";
7
+ function useAuthConfig() {
8
+ return useContext(AuthConfigContext);
9
+ }
10
+
11
+ export {
12
+ useAuthConfig
13
+ };
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ var _chunkC2FNSVJOjs = require("./chunk-C2FNSVJO.js");
6
+ var _chunkNWRANDZ6js = require("./chunk-NWRANDZ6.js");
7
+ // src/hooks/useTokensFromState.ts
8
+ function useTokensFromState() {
9
+ var authState = _chunkC2FNSVJOjs.useAuthState.call(void 0);
10
+ return !!_chunkNWRANDZ6js.validToken.call(void 0, authState.token, authState.refreshToken);
11
+ }
12
+ exports.useTokensFromState = useTokensFromState;
@@ -0,0 +1,9 @@
1
+ export { useAuthConfig } from './useAuthConfig.js';
2
+ export { useCurrentRouteName } from './useCurrentRouteName/index.js';
3
+ export { IKeycloak, ITokenParsed, Keycloak, useKeycloak } from './useKeycloak/index.js';
4
+ export { useLogin } from './useLogin.js';
5
+ export { useTokensFromQuery } from './useTokensFromQuery/index.js';
6
+ export { useTokensFromState } from './useTokensFromState.js';
7
+ import '../authConfig.js';
8
+ import 'react';
9
+ import '@bitspur/keycloak-js';
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ require("../chunk-UBVYEZI3.js");
6
+ require("../chunk-6NDWOV55.js");
7
+ var _chunkKLLABHICjs = require("../chunk-KLLABHIC.js");
8
+ var _chunkNRD376XVjs = require("../chunk-NRD376XV.js");
9
+ var _chunkOYWAYMFNjs = require("../chunk-OYWAYMFN.js");
10
+ var _chunkS3M2DZ6Gjs = require("../chunk-S3M2DZ6G.js");
11
+ var _chunk3ZPHNEJLjs = require("../chunk-3ZPHNEJL.js");
12
+ var _chunkYGNNHTFEjs = require("../chunk-YGNNHTFE.js");
13
+ require("../chunk-C2FNSVJO.js");
14
+ require("../chunk-A7UBOIAL.js");
15
+ require("../chunk-NWRANDZ6.js");
16
+ require("../chunk-XXPGZHWZ.js");
17
+ exports.Keycloak = _chunkS3M2DZ6Gjs.Keycloak;
18
+ exports.useAuthConfig = _chunk3ZPHNEJLjs.useAuthConfig;
19
+ exports.useCurrentRouteName = _chunkOYWAYMFNjs.useCurrentRouteName;
20
+ exports.useKeycloak = _chunkS3M2DZ6Gjs.useKeycloak;
21
+ exports.useLogin = _chunkNRD376XVjs.useLogin;
22
+ exports.useTokensFromQuery = _chunkKLLABHICjs.useTokensFromQuery;
23
+ exports.useTokensFromState = _chunkYGNNHTFEjs.useTokensFromState;
@@ -0,0 +1,34 @@
1
+ import "../chunk-AYKQVWMR.mjs";
2
+ import "../chunk-2GUOEPFY.mjs";
3
+ import {
4
+ useTokensFromQuery
5
+ } from "../chunk-NXTVYIBR.mjs";
6
+ import {
7
+ useLogin
8
+ } from "../chunk-6QZDLO3M.mjs";
9
+ import {
10
+ useCurrentRouteName
11
+ } from "../chunk-L5HMOY4M.mjs";
12
+ import {
13
+ Keycloak,
14
+ useKeycloak
15
+ } from "../chunk-BTHRDOLL.mjs";
16
+ import {
17
+ useAuthConfig
18
+ } from "../chunk-Y4XMF3R6.mjs";
19
+ import {
20
+ useTokensFromState
21
+ } from "../chunk-UOKDJT5L.mjs";
22
+ import "../chunk-AD6VPMID.mjs";
23
+ import "../chunk-64PPU7Q3.mjs";
24
+ import "../chunk-7MTPH6XK.mjs";
25
+ import "../chunk-NHABU752.mjs";
26
+ export {
27
+ Keycloak,
28
+ useAuthConfig,
29
+ useCurrentRouteName,
30
+ useKeycloak,
31
+ useLogin,
32
+ useTokensFromQuery,
33
+ useTokensFromState
34
+ };
@@ -0,0 +1,29 @@
1
+ import { AuthConfig } from '../authConfig.js';
2
+ import 'react';
3
+
4
+ /**
5
+ * File: /src/hooks/useAuthConfig.ts
6
+ * Project: app
7
+ * File Created: 08-11-2022 09:20:41
8
+ * Author: Clay Risser
9
+ * -----
10
+ * Last Modified: 25-11-2022 09:52:31
11
+ * Modified By: Clay Risser
12
+ * -----
13
+ * Risser Labs LLC (c) Copyright 2021 - 2022
14
+ *
15
+ * Licensed under the Apache License, Version 2.0 (the "License");
16
+ * you may not use this file except in compliance with the License.
17
+ * You may obtain a copy of the License at
18
+ *
19
+ * http://www.apache.org/licenses/LICENSE-2.0
20
+ *
21
+ * Unless required by applicable law or agreed to in writing, software
22
+ * distributed under the License is distributed on an "AS IS" BASIS,
23
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
24
+ * See the License for the specific language governing permissions and
25
+ * limitations under the License.
26
+ */
27
+ declare function useAuthConfig(): AuthConfig;
28
+
29
+ export { useAuthConfig };
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ var _chunk3ZPHNEJLjs = require("../chunk-3ZPHNEJL.js");
6
+ require("../chunk-A7UBOIAL.js");
7
+ require("../chunk-XXPGZHWZ.js");
8
+ exports.useAuthConfig = _chunk3ZPHNEJLjs.useAuthConfig;
@@ -0,0 +1,8 @@
1
+ import {
2
+ useAuthConfig
3
+ } from "../chunk-Y4XMF3R6.mjs";
4
+ import "../chunk-64PPU7Q3.mjs";
5
+ import "../chunk-NHABU752.mjs";
6
+ export {
7
+ useAuthConfig
8
+ };
@@ -0,0 +1,26 @@
1
+ /**
2
+ * File: /src/hooks/useCurrentRouteName/index.ts
3
+ * Project: @multiplatform.one/keycloak
4
+ * File Created: 24-02-2023 06:30:32
5
+ * Author: Clay Risser
6
+ * -----
7
+ * Last Modified: 24-02-2023 06:30:54
8
+ * Modified By: Clay Risser
9
+ * -----
10
+ * Risser Labs LLC (c) Copyright 2022 - 2023
11
+ *
12
+ * Licensed under the Apache License, Version 2.0 (the "License");
13
+ * you may not use this file except in compliance with the License.
14
+ * You may obtain a copy of the License at
15
+ *
16
+ * http://www.apache.org/licenses/LICENSE-2.0
17
+ *
18
+ * Unless required by applicable law or agreed to in writing, software
19
+ * distributed under the License is distributed on an "AS IS" BASIS,
20
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21
+ * See the License for the specific language governing permissions and
22
+ * limitations under the License.
23
+ */
24
+ declare function useCurrentRouteName(): string | null;
25
+
26
+ export { useCurrentRouteName };
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ var _chunkOYWAYMFNjs = require("../../chunk-OYWAYMFN.js");
6
+ require("../../chunk-XXPGZHWZ.js");
7
+ exports.useCurrentRouteName = _chunkOYWAYMFNjs.useCurrentRouteName;
@@ -0,0 +1,7 @@
1
+ import {
2
+ useCurrentRouteName
3
+ } from "../../chunk-L5HMOY4M.mjs";
4
+ import "../../chunk-NHABU752.mjs";
5
+ export {
6
+ useCurrentRouteName
7
+ };