@multiplatform.one/keycloak 0.0.2 → 0.0.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.
Files changed (116) hide show
  1. package/esm/Authenticated.js +8 -19
  2. package/esm/Authenticated.js.map +1 -1
  3. package/esm/authConfig.js +2 -2
  4. package/esm/authConfig.js.map +1 -1
  5. package/esm/expo/ExpoKeycloakContext.js +28 -0
  6. package/esm/expo/ExpoKeycloakContext.js.map +1 -0
  7. package/esm/expo/ExpoKeycloakProvider.js +113 -0
  8. package/esm/expo/ExpoKeycloakProvider.js.map +1 -0
  9. package/esm/expo/KeycloakContext.js +28 -0
  10. package/esm/expo/KeycloakContext.js.map +1 -0
  11. package/esm/expo/KeycloakProvider.js +142 -0
  12. package/esm/expo/KeycloakProvider.js.map +1 -0
  13. package/esm/expo/const.js +42 -0
  14. package/esm/expo/const.js.map +1 -0
  15. package/esm/expo/helpers.js +56 -0
  16. package/esm/expo/helpers.js.map +1 -0
  17. package/esm/expo/index.js +28 -0
  18. package/esm/expo/index.js.map +1 -0
  19. package/esm/expo/useExpoKeycloak.js +44 -0
  20. package/esm/expo/useExpoKeycloak.js.map +1 -0
  21. package/esm/expo/useTokenStorage.js +153 -0
  22. package/esm/expo/useTokenStorage.js.map +1 -0
  23. package/esm/hooks/useCurrentRouteName.js +2 -3
  24. package/esm/hooks/useCurrentRouteName.js.map +1 -1
  25. package/esm/hooks/useKeycloak/index.js +1 -1
  26. package/esm/hooks/useKeycloak/index.js.map +1 -1
  27. package/esm/hooks/useKeycloak/useKeycloak.js +17 -24
  28. package/esm/hooks/useKeycloak/useKeycloak.js.map +1 -1
  29. package/esm/hooks/useKeycloak/useKeycloak.native.js +39 -24
  30. package/esm/hooks/useKeycloak/useKeycloak.native.js.map +1 -1
  31. package/esm/hooks/useLogin.js +12 -30
  32. package/esm/hooks/useLogin.js.map +1 -1
  33. package/esm/provider/afterAuth.js +21 -39
  34. package/esm/provider/afterAuth.js.map +1 -1
  35. package/esm/provider/index.js +11 -28
  36. package/esm/provider/index.js.map +1 -1
  37. package/esm/provider/keycloakProvider.js +55 -100
  38. package/esm/provider/keycloakProvider.js.map +1 -1
  39. package/esm/provider/keycloakProvider.native.js +12 -11
  40. package/esm/provider/keycloakProvider.native.js.map +1 -1
  41. package/esm/state/index.js +2 -2
  42. package/esm/state/index.js.map +1 -1
  43. package/lib/Authenticated.js +38 -26
  44. package/lib/Authenticated.js.map +1 -1
  45. package/lib/authConfig.js +2 -4
  46. package/lib/authConfig.js.map +1 -1
  47. package/lib/expo/ExpoKeycloakContext.d.ts +32 -0
  48. package/lib/expo/ExpoKeycloakContext.js +47 -0
  49. package/lib/expo/ExpoKeycloakContext.js.map +1 -0
  50. package/lib/expo/ExpoKeycloakProvider.d.ts +37 -0
  51. package/lib/expo/ExpoKeycloakProvider.js +130 -0
  52. package/lib/expo/ExpoKeycloakProvider.js.map +1 -0
  53. package/lib/expo/KeycloakContext.d.ts +32 -0
  54. package/lib/expo/KeycloakContext.js +49 -0
  55. package/lib/expo/KeycloakContext.js.map +1 -0
  56. package/lib/expo/KeycloakProvider.d.ts +37 -0
  57. package/lib/expo/KeycloakProvider.js +138 -0
  58. package/lib/expo/KeycloakProvider.js.map +1 -0
  59. package/lib/expo/const.d.ts +33 -0
  60. package/lib/expo/const.js +66 -0
  61. package/lib/expo/const.js.map +1 -0
  62. package/lib/expo/helpers.d.ts +41 -0
  63. package/lib/expo/helpers.js +77 -0
  64. package/lib/expo/helpers.js.map +1 -0
  65. package/lib/expo/index.d.ts +26 -0
  66. package/lib/expo/index.js +50 -0
  67. package/lib/expo/index.js.map +1 -0
  68. package/lib/expo/useExpoKeycloak.d.ts +31 -0
  69. package/lib/expo/useExpoKeycloak.js +62 -0
  70. package/lib/expo/useExpoKeycloak.js.map +1 -0
  71. package/lib/expo/useTokenStorage.d.ts +36 -0
  72. package/lib/expo/useTokenStorage.js +166 -0
  73. package/lib/expo/useTokenStorage.js.map +1 -0
  74. package/lib/hooks/index.js +3 -9
  75. package/lib/hooks/index.js.map +1 -1
  76. package/lib/hooks/useAuthConfig.js +0 -2
  77. package/lib/hooks/useAuthConfig.js.map +1 -1
  78. package/lib/hooks/useCurrentRouteName.js +6 -8
  79. package/lib/hooks/useCurrentRouteName.js.map +1 -1
  80. package/lib/hooks/useKeycloak/index.d.ts +6 -4
  81. package/lib/hooks/useKeycloak/index.js +1 -7
  82. package/lib/hooks/useKeycloak/index.js.map +1 -1
  83. package/lib/hooks/useKeycloak/useKeycloak.js +45 -30
  84. package/lib/hooks/useKeycloak/useKeycloak.js.map +1 -1
  85. package/lib/hooks/useKeycloak/useKeycloak.native.d.ts +12 -4
  86. package/lib/hooks/useKeycloak/useKeycloak.native.js +40 -28
  87. package/lib/hooks/useKeycloak/useKeycloak.native.js.map +1 -1
  88. package/lib/hooks/useLogin.js +16 -25
  89. package/lib/hooks/useLogin.js.map +1 -1
  90. package/lib/index.js +4 -10
  91. package/lib/index.js.map +1 -1
  92. package/lib/provider/afterAuth.js +52 -52
  93. package/lib/provider/afterAuth.js.map +1 -1
  94. package/lib/provider/index.js +44 -43
  95. package/lib/provider/index.js.map +1 -1
  96. package/lib/provider/keycloakProvider.js +93 -114
  97. package/lib/provider/keycloakProvider.js.map +1 -1
  98. package/lib/provider/keycloakProvider.native.js +39 -15
  99. package/lib/provider/keycloakProvider.native.js.map +1 -1
  100. package/lib/state/index.js +3 -5
  101. package/lib/state/index.js.map +1 -1
  102. package/lib/tsconfig.build.tsbuildinfo +1 -1
  103. package/lib/types.js +2 -4
  104. package/lib/types.js.map +1 -1
  105. package/package.json +3 -2
  106. package/src/expo/ExpoKeycloakContext.ts +41 -0
  107. package/src/expo/ExpoKeycloakProvider.tsx +139 -0
  108. package/src/expo/NOTES +1 -0
  109. package/src/expo/const.ts +42 -0
  110. package/src/expo/helpers.ts +74 -0
  111. package/src/{@types/expoKeycloakAuth.d.ts → expo/index.ts} +6 -7
  112. package/src/expo/useExpoKeycloak.ts +44 -0
  113. package/src/expo/useTokenStorage.ts +168 -0
  114. package/src/hooks/useKeycloak/index.ts +10 -4
  115. package/src/hooks/useKeycloak/useKeycloak.native.ts +48 -11
  116. package/src/provider/keycloakProvider.native.tsx +8 -4
@@ -1 +1 @@
1
- {"version":3,"file":"useCurrentRouteName.js","names":["useCurrentRouteName","MultiPlatform","isStorybook","isNext","router","useRouter","route","useRoute","name"],"sources":["../../src/hooks/useCurrentRouteName.ts"],"sourcesContent":["/**\n * File: /src/hooks/useCurrentRouteName.ts\n * Project: app\n * File Created: 08-11-2022 08:38:23\n * Author: Clay Risser\n * -----\n * Last Modified: 25-11-2022 10:24:27\n * Modified By: Clay Risser\n * -----\n * Risser Labs LLC (c) Copyright 2021 - 2022\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { MultiPlatform } from \"multiplatform.one\";\nimport { useRoute } from \"@react-navigation/native\";\nimport { useRouter } from \"next/router\";\n\nexport function useCurrentRouteName() {\n if (MultiPlatform.isStorybook()) return null;\n if (MultiPlatform.isNext()) {\n const router = useRouter();\n return router.route;\n }\n const route = useRoute();\n return route.name;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;EAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;EAMO,SAASA,mBAAmB,GAAG;IACpC,IAAIC,4BAAa,CAACC,WAAW,EAAE,EAAE,OAAO,IAAI;IAC5C,IAAID,4BAAa,CAACE,MAAM,EAAE,EAAE;MAC1B,IAAMC,MAAM,GAAG,IAAAC,iBAAS,GAAE;MAC1B,OAAOD,MAAM,CAACE,KAAK;IACrB;IACA,IAAMA,KAAK,GAAG,IAAAC,gBAAQ,GAAE;IACxB,OAAOD,KAAK,CAACE,IAAI;EACnB;AAAC"}
1
+ {"version":3,"file":"useCurrentRouteName.js","names":["useCurrentRouteName","MultiPlatform","isStorybook","isNext","router","useRouter","route","useRoute","name"],"sources":["../../src/hooks/useCurrentRouteName.ts"],"sourcesContent":["/**\n * File: /src/hooks/useCurrentRouteName.ts\n * Project: app\n * File Created: 08-11-2022 08:38:23\n * Author: Clay Risser\n * -----\n * Last Modified: 25-11-2022 10:24:27\n * Modified By: Clay Risser\n * -----\n * Risser Labs LLC (c) Copyright 2021 - 2022\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { MultiPlatform } from \"multiplatform.one\";\nimport { useRoute } from \"@react-navigation/native\";\nimport { useRouter } from \"next/router\";\n\nexport function useCurrentRouteName() {\n if (MultiPlatform.isStorybook()) return null;\n if (MultiPlatform.isNext()) {\n const router = useRouter();\n return router.route;\n }\n const route = useRoute();\n return route.name;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;EAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;EAMO,SAASA,mBAAmB,GAAG;IACpC,IAAIC,4BAAa,CAACC,WAAW,EAAE,EAAE,OAAO,IAAI;IAC5C,IAAID,4BAAa,CAACE,MAAM,EAAE,EAAE;MAC1B,MAAMC,MAAM,GAAG,IAAAC,iBAAS,GAAE;MAC1B,OAAOD,MAAM,CAACE,KAAK;IACrB;IACA,MAAMA,KAAK,GAAG,IAAAC,gBAAQ,GAAE;IACxB,OAAOD,KAAK,CAACE,IAAI;EACnB;AAAC"}
@@ -4,7 +4,7 @@
4
4
  * File Created: 08-11-2022 14:10:44
5
5
  * Author: Clay Risser
6
6
  * -----
7
- * Last Modified: 25-11-2022 14:17:22
7
+ * Last Modified: 26-11-2022 08:31:01
8
8
  * Modified By: Clay Risser
9
9
  * -----
10
10
  * Risser Labs LLC (c) Copyright 2021 - 2022
@@ -21,13 +21,15 @@
21
21
  * See the License for the specific language governing permissions and
22
22
  * limitations under the License.
23
23
  */
24
- import type { KeycloakTokenParsed } from "keycloak-js";
24
+ import type { KeycloakResourceAccess, KeycloakRoles, KeycloakTokenParsed } from "keycloak-js";
25
25
  export * from "./useKeycloak";
26
26
  export interface IKeycloak {
27
27
  authenticated?: boolean;
28
28
  token?: string;
29
29
  refreshToken?: string;
30
30
  tokenParsed?: KeycloakTokenParsed;
31
- login: () => unknown;
32
- logout: () => unknown;
31
+ realmAccess?: KeycloakRoles;
32
+ resourceAccess?: KeycloakResourceAccess;
33
+ login: () => Promise<unknown> | unknown;
34
+ logout: () => Promise<unknown> | unknown;
33
35
  }
@@ -1,9 +1,3 @@
1
- require("core-js/modules/esnext.global-this.js");
2
- require("core-js/modules/es.object.define-property.js");
3
- require("core-js/modules/es.array.for-each.js");
4
- require("core-js/modules/es.object.to-string.js");
5
- require("core-js/modules/web.dom-collections.for-each.js");
6
- require("core-js/modules/es.object.keys.js");
7
1
  (function (global, factory) {
8
2
  if (typeof define === "function" && define.amd) {
9
3
  define(["exports", "./useKeycloak"], factory);
@@ -27,7 +21,7 @@ require("core-js/modules/es.object.keys.js");
27
21
  if (key in _exports && _exports[key] === _useKeycloak[key]) return;
28
22
  Object.defineProperty(_exports, key, {
29
23
  enumerable: true,
30
- get: function get() {
24
+ get: function () {
31
25
  return _useKeycloak[key];
32
26
  }
33
27
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../src/hooks/useKeycloak/index.ts"],"sourcesContent":["/**\n * File: /src/hooks/useKeycloak/index.ts\n * Project: app\n * File Created: 08-11-2022 14:10:44\n * Author: Clay Risser\n * -----\n * Last Modified: 25-11-2022 14:17:22\n * Modified By: Clay Risser\n * -----\n * Risser Labs LLC (c) Copyright 2021 - 2022\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { KeycloakTokenParsed } from \"keycloak-js\";\nexport * from \"./useKeycloak\";\n\nexport interface IKeycloak {\n authenticated?: boolean;\n token?: string;\n refreshToken?: string;\n tokenParsed?: KeycloakTokenParsed;\n login: () => unknown;\n logout: () => unknown;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;EAyBA;IAAA;IAAA;IAAA;MAAA;MAAA;QAAA;MAAA;IAAA;EAAA;AAA8B"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../src/hooks/useKeycloak/index.ts"],"sourcesContent":["/**\n * File: /src/hooks/useKeycloak/index.ts\n * Project: app\n * File Created: 08-11-2022 14:10:44\n * Author: Clay Risser\n * -----\n * Last Modified: 26-11-2022 08:31:01\n * Modified By: Clay Risser\n * -----\n * Risser Labs LLC (c) Copyright 2021 - 2022\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n KeycloakResourceAccess,\n KeycloakRoles,\n KeycloakTokenParsed,\n} from \"keycloak-js\";\nexport * from \"./useKeycloak\";\n\nexport interface IKeycloak {\n authenticated?: boolean;\n token?: string;\n refreshToken?: string;\n tokenParsed?: KeycloakTokenParsed;\n realmAccess?: KeycloakRoles;\n resourceAccess?: KeycloakResourceAccess;\n login: () => Promise<unknown> | unknown;\n logout: () => Promise<unknown> | unknown;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;EA6BA;IAAA;IAAA;IAAA;MAAA;MAAA;QAAA;MAAA;IAAA;EAAA;AAA8B"}
@@ -1,54 +1,69 @@
1
- require("core-js/modules/esnext.global-this.js");
2
- require("core-js/modules/es.object.define-property.js");
3
- require("core-js/modules/es.object.keys.js");
4
- require("core-js/modules/es.symbol.js");
5
- require("core-js/modules/es.array.filter.js");
6
- require("core-js/modules/es.object.to-string.js");
7
- require("core-js/modules/es.object.get-own-property-descriptor.js");
8
- require("core-js/modules/es.array.for-each.js");
9
- require("core-js/modules/web.dom-collections.for-each.js");
10
- require("core-js/modules/es.object.get-own-property-descriptors.js");
11
- require("core-js/modules/es.object.define-properties.js");
12
1
  (function (global, factory) {
13
2
  if (typeof define === "function" && define.amd) {
14
- define(["exports", "@babel/runtime/helpers/defineProperty", "multiplatform.one", "@react-keycloak/web", "@react-keycloak/ssr", "../useAuthConfig"], factory);
3
+ define(["exports", "multiplatform.one", "@react-keycloak/web", "@react-keycloak/ssr", "../useAuthConfig"], factory);
15
4
  } else if (typeof exports !== "undefined") {
16
- factory(exports, require("@babel/runtime/helpers/defineProperty"), require("multiplatform.one"), require("@react-keycloak/web"), require("@react-keycloak/ssr"), require("../useAuthConfig"));
5
+ factory(exports, require("multiplatform.one"), require("@react-keycloak/web"), require("@react-keycloak/ssr"), require("../useAuthConfig"));
17
6
  } else {
18
7
  var mod = {
19
8
  exports: {}
20
9
  };
21
- factory(mod.exports, global.defineProperty, global.multiplatform, global.web, global.ssr, global.useAuthConfig);
10
+ factory(mod.exports, global.multiplatform, global.web, global.ssr, global.useAuthConfig);
22
11
  global.useKeycloak = mod.exports;
23
12
  }
24
- })(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports, _defineProperty2, _multiplatform, _web, _ssr, _useAuthConfig) {
13
+ })(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports, _multiplatform, _web, _ssr, _useAuthConfig) {
25
14
  "use strict";
26
15
 
27
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
28
16
  Object.defineProperty(_exports, "__esModule", {
29
17
  value: true
30
18
  });
31
19
  _exports.useKeycloak = useKeycloak;
32
- _defineProperty2 = _interopRequireDefault(_defineProperty2);
33
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
34
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
20
+ /**
21
+ * File: /src/hooks/useKeycloak/useKeycloak.ts
22
+ * Project: app
23
+ * File Created: 08-11-2022 06:04:59
24
+ * Author: Clay Risser
25
+ * -----
26
+ * Last Modified: 25-11-2022 10:22:57
27
+ * Modified By: Clay Risser
28
+ * -----
29
+ * Risser Labs LLC (c) Copyright 2021 - 2022
30
+ *
31
+ * Licensed under the Apache License, Version 2.0 (the "License");
32
+ * you may not use this file except in compliance with the License.
33
+ * You may obtain a copy of the License at
34
+ *
35
+ * http://www.apache.org/licenses/LICENSE-2.0
36
+ *
37
+ * Unless required by applicable law or agreed to in writing, software
38
+ * distributed under the License is distributed on an "AS IS" BASIS,
39
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
40
+ * See the License for the specific language governing permissions and
41
+ * limitations under the License.
42
+ */
43
+
35
44
  function useKeycloak() {
36
- var authConfig = (0, _useAuthConfig.useAuthConfig)();
45
+ const authConfig = (0, _useAuthConfig.useAuthConfig)();
37
46
  if (_multiplatform.MultiPlatform.isStorybook()) return {
38
47
  authenticated: true
39
48
  };
40
49
  if (_multiplatform.MultiPlatform.isNext() && authConfig.ssr) {
41
- var _useSsrKeycloak = (0, _ssr.useKeycloak)(),
42
- ssrKeycloak = _useSsrKeycloak.keycloak,
43
- _initialized = _useSsrKeycloak.initialized;
44
- var _keycloak = _objectSpread({}, ssrKeycloak);
45
- if (!_initialized) _keycloak.authenticated = undefined;
46
- return _keycloak;
50
+ const {
51
+ keycloak: ssrKeycloak,
52
+ initialized
53
+ } = (0, _ssr.useKeycloak)();
54
+ const keycloak = {
55
+ ...ssrKeycloak
56
+ };
57
+ if (!initialized) keycloak.authenticated = undefined;
58
+ return keycloak;
47
59
  }
48
- var _useReactKeycloak = (0, _web.useKeycloak)(),
49
- reactKeycloak = _useReactKeycloak.keycloak,
50
- initialized = _useReactKeycloak.initialized;
51
- var keycloak = _objectSpread({}, reactKeycloak);
60
+ const {
61
+ keycloak: reactKeycloak,
62
+ initialized
63
+ } = (0, _web.useKeycloak)();
64
+ const keycloak = {
65
+ ...reactKeycloak
66
+ };
52
67
  if (!initialized) keycloak.authenticated = undefined;
53
68
  return keycloak;
54
69
  }
@@ -1 +1 @@
1
- {"version":3,"file":"useKeycloak.js","names":["useKeycloak","authConfig","useAuthConfig","MultiPlatform","isStorybook","authenticated","isNext","ssr","useSsrKeycloak","ssrKeycloak","keycloak","initialized","undefined","useReactKeycloak","reactKeycloak"],"sources":["../../../src/hooks/useKeycloak/useKeycloak.ts"],"sourcesContent":["/**\n * File: /src/hooks/useKeycloak/useKeycloak.ts\n * Project: app\n * File Created: 08-11-2022 06:04:59\n * Author: Clay Risser\n * -----\n * Last Modified: 25-11-2022 10:22:57\n * Modified By: Clay Risser\n * -----\n * Risser Labs LLC (c) Copyright 2021 - 2022\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Keycloak from \"keycloak-js\";\nimport { MultiPlatform } from \"multiplatform.one\";\nimport { useKeycloak as useReactKeycloak } from \"@react-keycloak/web\";\nimport { useKeycloak as useSsrKeycloak } from \"@react-keycloak/ssr\";\nimport { IKeycloak } from \"./index\";\nimport { useAuthConfig } from \"../useAuthConfig\";\n\nexport function useKeycloak() {\n const authConfig = useAuthConfig();\n if (MultiPlatform.isStorybook()) return { authenticated: true } as IKeycloak;\n if (MultiPlatform.isNext() && authConfig.ssr) {\n const { keycloak: ssrKeycloak, initialized } = useSsrKeycloak();\n const keycloak = { ...ssrKeycloak } as Keycloak;\n if (!initialized) keycloak.authenticated = undefined;\n return keycloak as IKeycloak;\n }\n const { keycloak: reactKeycloak, initialized } = useReactKeycloak();\n const keycloak = { ...reactKeycloak } as Keycloak;\n if (!initialized) keycloak.authenticated = undefined;\n return keycloak as IKeycloak;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+BO,SAASA,WAAW,GAAG;IAC5B,IAAMC,UAAU,GAAG,IAAAC,4BAAa,GAAE;IAClC,IAAIC,4BAAa,CAACC,WAAW,EAAE,EAAE,OAAO;MAAEC,aAAa,EAAE;IAAK,CAAC;IAC/D,IAAIF,4BAAa,CAACG,MAAM,EAAE,IAAIL,UAAU,CAACM,GAAG,EAAE;MAC5C,sBAA+C,IAAAC,gBAAc,GAAE;QAA7CC,WAAW,mBAArBC,QAAQ;QAAeC,YAAW,mBAAXA,WAAW;MAC1C,IAAMD,SAAQ,qBAAQD,WAAW,CAAc;MAC/C,IAAI,CAACE,YAAW,EAAED,SAAQ,CAACL,aAAa,GAAGO,SAAS;MACpD,OAAOF,SAAQ;IACjB;IACA,wBAAiD,IAAAG,gBAAgB,GAAE;MAAjDC,aAAa,qBAAvBJ,QAAQ;MAAiBC,WAAW,qBAAXA,WAAW;IAC5C,IAAMD,QAAQ,qBAAQI,aAAa,CAAc;IACjD,IAAI,CAACH,WAAW,EAAED,QAAQ,CAACL,aAAa,GAAGO,SAAS;IACpD,OAAOF,QAAQ;EACjB;AAAC"}
1
+ {"version":3,"file":"useKeycloak.js","names":["useKeycloak","authConfig","useAuthConfig","MultiPlatform","isStorybook","authenticated","isNext","ssr","keycloak","ssrKeycloak","initialized","useSsrKeycloak","undefined","reactKeycloak","useReactKeycloak"],"sources":["../../../src/hooks/useKeycloak/useKeycloak.ts"],"sourcesContent":["/**\n * File: /src/hooks/useKeycloak/useKeycloak.ts\n * Project: app\n * File Created: 08-11-2022 06:04:59\n * Author: Clay Risser\n * -----\n * Last Modified: 25-11-2022 10:22:57\n * Modified By: Clay Risser\n * -----\n * Risser Labs LLC (c) Copyright 2021 - 2022\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Keycloak from \"keycloak-js\";\nimport { MultiPlatform } from \"multiplatform.one\";\nimport { useKeycloak as useReactKeycloak } from \"@react-keycloak/web\";\nimport { useKeycloak as useSsrKeycloak } from \"@react-keycloak/ssr\";\nimport { IKeycloak } from \"./index\";\nimport { useAuthConfig } from \"../useAuthConfig\";\n\nexport function useKeycloak() {\n const authConfig = useAuthConfig();\n if (MultiPlatform.isStorybook()) return { authenticated: true } as IKeycloak;\n if (MultiPlatform.isNext() && authConfig.ssr) {\n const { keycloak: ssrKeycloak, initialized } = useSsrKeycloak();\n const keycloak = { ...ssrKeycloak } as Keycloak;\n if (!initialized) keycloak.authenticated = undefined;\n return keycloak as IKeycloak;\n }\n const { keycloak: reactKeycloak, initialized } = useReactKeycloak();\n const keycloak = { ...reactKeycloak } as Keycloak;\n if (!initialized) keycloak.authenticated = undefined;\n return keycloak as IKeycloak;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;EAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;EASO,SAASA,WAAW,GAAG;IAC5B,MAAMC,UAAU,GAAG,IAAAC,4BAAa,GAAE;IAClC,IAAIC,4BAAa,CAACC,WAAW,EAAE,EAAE,OAAO;MAAEC,aAAa,EAAE;IAAK,CAAC;IAC/D,IAAIF,4BAAa,CAACG,MAAM,EAAE,IAAIL,UAAU,CAACM,GAAG,EAAE;MAC5C,MAAM;QAAEC,QAAQ,EAAEC,WAAW;QAAEC;MAAY,CAAC,GAAG,IAAAC,gBAAc,GAAE;MAC/D,MAAMH,QAAQ,GAAG;QAAE,GAAGC;MAAY,CAAa;MAC/C,IAAI,CAACC,WAAW,EAAEF,QAAQ,CAACH,aAAa,GAAGO,SAAS;MACpD,OAAOJ,QAAQ;IACjB;IACA,MAAM;MAAEA,QAAQ,EAAEK,aAAa;MAAEH;IAAY,CAAC,GAAG,IAAAI,gBAAgB,GAAE;IACnE,MAAMN,QAAQ,GAAG;MAAE,GAAGK;IAAc,CAAa;IACjD,IAAI,CAACH,WAAW,EAAEF,QAAQ,CAACH,aAAa,GAAGO,SAAS;IACpD,OAAOJ,QAAQ;EACjB;AAAC"}
@@ -4,7 +4,7 @@
4
4
  * File Created: 08-11-2022 14:10:25
5
5
  * Author: Clay Risser
6
6
  * -----
7
- * Last Modified: 25-11-2022 14:19:06
7
+ * Last Modified: 26-11-2022 09:05:23
8
8
  * Modified By: Clay Risser
9
9
  * -----
10
10
  * Risser Labs LLC (c) Copyright 2021 - 2022
@@ -21,14 +21,22 @@
21
21
  * See the License for the specific language governing permissions and
22
22
  * limitations under the License.
23
23
  */
24
- import { KeycloakTokenParsed } from "keycloak-js";
24
+ import "core-js/actual/atob";
25
+ import "core-js/actual/escape";
26
+ import { AuthRequestPromptOptions, AuthSessionResult } from "expo-auth-session";
25
27
  import { IKeycloak } from "./index";
28
+ import { KeycloakResourceAccess, KeycloakRoles, KeycloakTokenParsed } from "keycloak-js";
26
29
  export declare function useKeycloak(): IKeycloak;
27
30
  export declare class ExpoKeycloak implements IKeycloak {
28
- login: () => unknown;
29
31
  logout: () => unknown;
30
32
  token?: string | undefined;
33
+ refreshToken?: string | undefined;
31
34
  authenticated?: boolean;
32
35
  tokenParsed?: KeycloakTokenParsed;
33
- constructor(ready: boolean, isLoggedIn: boolean, login: () => unknown, logout: () => unknown, token?: string | undefined);
36
+ refreshTokenParsed?: KeycloakTokenParsed;
37
+ subject?: string;
38
+ realmAccess?: KeycloakRoles;
39
+ resourceAccess?: KeycloakResourceAccess;
40
+ login: () => Promise<unknown> | unknown;
41
+ constructor(ready: boolean, isLoggedIn: boolean | undefined, login: (options?: AuthRequestPromptOptions) => Promise<AuthSessionResult | undefined>, logout: () => unknown, token?: string | undefined, refreshToken?: string | undefined);
34
42
  }
@@ -1,35 +1,30 @@
1
- require("core-js/modules/esnext.global-this.js");
2
- require("core-js/modules/es.object.define-property.js");
3
1
  (function (global, factory) {
4
2
  if (typeof define === "function" && define.amd) {
5
- define(["exports", "core-js/modules/es.regexp.exec.js", "core-js/modules/es.string.replace.js", "@babel/runtime/helpers/createClass", "@babel/runtime/helpers/classCallCheck", "expo-keycloak-auth", "multiplatform.one"], factory);
3
+ define(["exports", "core-js/actual/atob", "core-js/actual/escape", "multiplatform.one", "../../expo"], factory);
6
4
  } else if (typeof exports !== "undefined") {
7
- factory(exports, require("core-js/modules/es.regexp.exec.js"), require("core-js/modules/es.string.replace.js"), require("@babel/runtime/helpers/createClass"), require("@babel/runtime/helpers/classCallCheck"), require("expo-keycloak-auth"), require("multiplatform.one"));
5
+ factory(exports, require("core-js/actual/atob"), require("core-js/actual/escape"), require("multiplatform.one"), require("../../expo"));
8
6
  } else {
9
7
  var mod = {
10
8
  exports: {}
11
9
  };
12
- factory(mod.exports, global.esRegexpExec, global.esStringReplace, global.createClass, global.classCallCheck, global.expoKeycloakAuth, global.multiplatform);
10
+ factory(mod.exports, global.atob, global.escape, global.multiplatform, global.expo);
13
11
  global.useKeycloakNative = mod.exports;
14
12
  }
15
- })(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports, _esRegexpExec, _esStringReplace, _createClass2, _classCallCheck2, _expoKeycloakAuth, _multiplatform) {
13
+ })(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports, _atob, _escape, _multiplatform, _expo) {
16
14
  "use strict";
17
15
 
18
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
19
16
  Object.defineProperty(_exports, "__esModule", {
20
17
  value: true
21
18
  });
22
19
  _exports.ExpoKeycloak = void 0;
23
20
  _exports.useKeycloak = useKeycloak;
24
- _createClass2 = _interopRequireDefault(_createClass2);
25
- _classCallCheck2 = _interopRequireDefault(_classCallCheck2);
26
21
  /**
27
22
  * File: /src/hooks/useKeycloak/useKeycloak.native.ts
28
23
  * Project: app
29
24
  * File Created: 08-11-2022 14:10:25
30
25
  * Author: Clay Risser
31
26
  * -----
32
- * Last Modified: 25-11-2022 14:19:06
27
+ * Last Modified: 26-11-2022 09:05:23
33
28
  * Modified By: Clay Risser
34
29
  * -----
35
30
  * Risser Labs LLC (c) Copyright 2021 - 2022
@@ -51,27 +46,44 @@ require("core-js/modules/es.object.define-property.js");
51
46
  if (_multiplatform.MultiPlatform.isStorybook()) return {
52
47
  authenticated: true
53
48
  };
54
- var _useKeycloakExpo = (0, _expoKeycloakAuth.useKeycloak)(),
55
- ready = _useKeycloakExpo.ready,
56
- login = _useKeycloakExpo.login,
57
- isLoggedIn = _useKeycloakExpo.isLoggedIn,
58
- token = _useKeycloakExpo.token,
59
- logout = _useKeycloakExpo.logout;
60
- var keycloak = new ExpoKeycloak(ready, isLoggedIn, login, logout, token);
49
+ const {
50
+ ready,
51
+ login,
52
+ isLoggedIn,
53
+ token,
54
+ logout,
55
+ refreshToken
56
+ } = (0, _expo.useExpoKeycloak)();
57
+ const keycloak = new ExpoKeycloak(ready, isLoggedIn, login, logout, token || undefined, refreshToken || undefined);
61
58
  return keycloak;
62
59
  }
63
- var ExpoKeycloak = /*#__PURE__*/(0, _createClass2["default"])(function ExpoKeycloak(ready, isLoggedIn, login, logout, token) {
64
- (0, _classCallCheck2["default"])(this, ExpoKeycloak);
65
- this.login = login;
66
- this.logout = logout;
67
- this.token = token;
68
- this.authenticated = void 0;
69
- this.tokenParsed = void 0;
70
- if (ready) this.authenticated = isLoggedIn;
71
- if (this.authenticated && this.token) {
72
- this.tokenParsed = decodeToken(this.token);
60
+ class ExpoKeycloak {
61
+ constructor(ready, isLoggedIn, login, logout, token, refreshToken) {
62
+ this.logout = logout;
63
+ this.token = token;
64
+ this.refreshToken = refreshToken;
65
+ this.authenticated = void 0;
66
+ this.tokenParsed = void 0;
67
+ this.refreshTokenParsed = void 0;
68
+ this.subject = void 0;
69
+ this.realmAccess = void 0;
70
+ this.resourceAccess = void 0;
71
+ this.login = void 0;
72
+ if (ready) this.authenticated = isLoggedIn;
73
+ if (this.authenticated) {
74
+ if (this.token) this.tokenParsed = decodeToken(this.token);
75
+ if (this.refreshToken) {
76
+ this.refreshTokenParsed = decodeToken(this.refreshToken);
77
+ }
78
+ if (this.tokenParsed) {
79
+ this.subject = this.tokenParsed.sub;
80
+ this.realmAccess = this.tokenParsed.realm_access;
81
+ this.resourceAccess = this.tokenParsed.resource_access;
82
+ }
83
+ }
84
+ this.login = () => login();
73
85
  }
74
- });
86
+ }
75
87
  _exports.ExpoKeycloak = ExpoKeycloak;
76
88
  function decodeToken(str) {
77
89
  str = str.split(".")[1];
@@ -1 +1 @@
1
- {"version":3,"file":"useKeycloak.native.js","names":["useKeycloak","MultiPlatform","isStorybook","authenticated","useKeycloakExpo","ready","login","isLoggedIn","token","logout","keycloak","ExpoKeycloak","tokenParsed","decodeToken","str","split","replace","length","decodeURIComponent","escape","atob","JSON","parse"],"sources":["../../../src/hooks/useKeycloak/useKeycloak.native.ts"],"sourcesContent":["/**\n * File: /src/hooks/useKeycloak/useKeycloak.native.ts\n * Project: app\n * File Created: 08-11-2022 14:10:25\n * Author: Clay Risser\n * -----\n * Last Modified: 25-11-2022 14:19:06\n * Modified By: Clay Risser\n * -----\n * Risser Labs LLC (c) Copyright 2021 - 2022\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useKeycloak as useKeycloakExpo } from \"expo-keycloak-auth\";\nimport { KeycloakTokenParsed } from \"keycloak-js\";\nimport { MultiPlatform } from \"multiplatform.one\";\nimport { IKeycloak } from \"./index\";\n\nexport function useKeycloak() {\n if (MultiPlatform.isStorybook()) return { authenticated: true } as IKeycloak;\n const { ready, login, isLoggedIn, token, logout } = useKeycloakExpo();\n const keycloak = new ExpoKeycloak(ready, isLoggedIn, login, logout, token);\n return keycloak as IKeycloak;\n}\n\nexport class ExpoKeycloak implements IKeycloak {\n authenticated?: boolean;\n\n tokenParsed?: KeycloakTokenParsed;\n\n constructor(\n ready: boolean,\n isLoggedIn: boolean,\n public login: () => unknown,\n public logout: () => unknown,\n public token?: string\n ) {\n if (ready) this.authenticated = isLoggedIn;\n if (this.authenticated && this.token) {\n this.tokenParsed = decodeToken(this.token);\n }\n }\n}\n\nfunction decodeToken(str: string) {\n str = str.split(\".\")[1];\n str = str.replace(/-/g, \"+\");\n str = str.replace(/_/g, \"/\");\n switch (str.length % 4) {\n case 0:\n break;\n case 2:\n str += \"==\";\n break;\n case 3:\n str += \"=\";\n break;\n default:\n throw \"Invalid token\";\n }\n str = decodeURIComponent(escape(atob(str)));\n str = JSON.parse(str);\n return str as unknown as KeycloakTokenParsed;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;EAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;EAOO,SAASA,WAAW,GAAG;IAC5B,IAAIC,4BAAa,CAACC,WAAW,EAAE,EAAE,OAAO;MAAEC,aAAa,EAAE;IAAK,CAAC;IAC/D,uBAAoD,IAAAC,6BAAe,GAAE;MAA7DC,KAAK,oBAALA,KAAK;MAAEC,KAAK,oBAALA,KAAK;MAAEC,UAAU,oBAAVA,UAAU;MAAEC,KAAK,oBAALA,KAAK;MAAEC,MAAM,oBAANA,MAAM;IAC/C,IAAMC,QAAQ,GAAG,IAAIC,YAAY,CAACN,KAAK,EAAEE,UAAU,EAAED,KAAK,EAAEG,MAAM,EAAED,KAAK,CAAC;IAC1E,OAAOE,QAAQ;EACjB;EAAC,IAEYC,YAAY,8CAKvB,sBACEN,KAAc,EACdE,UAAmB,EACZD,KAAoB,EACpBG,MAAqB,EACrBD,KAAc,EACrB;IAAA;IAAA,KAHOF,KAAoB,GAApBA,KAAoB;IAAA,KACpBG,MAAqB,GAArBA,MAAqB;IAAA,KACrBD,KAAc,GAAdA,KAAc;IAAA,KATvBL,aAAa;IAAA,KAEbS,WAAW;IAST,IAAIP,KAAK,EAAE,IAAI,CAACF,aAAa,GAAGI,UAAU;IAC1C,IAAI,IAAI,CAACJ,aAAa,IAAI,IAAI,CAACK,KAAK,EAAE;MACpC,IAAI,CAACI,WAAW,GAAGC,WAAW,CAAC,IAAI,CAACL,KAAK,CAAC;IAC5C;EACF,CAAC;EAAA;EAGH,SAASK,WAAW,CAACC,GAAW,EAAE;IAChCA,GAAG,GAAGA,GAAG,CAACC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IACvBD,GAAG,GAAGA,GAAG,CAACE,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC;IAC5BF,GAAG,GAAGA,GAAG,CAACE,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC;IAC5B,QAAQF,GAAG,CAACG,MAAM,GAAG,CAAC;MACpB,KAAK,CAAC;QACJ;MACF,KAAK,CAAC;QACJH,GAAG,IAAI,IAAI;QACX;MACF,KAAK,CAAC;QACJA,GAAG,IAAI,GAAG;QACV;MACF;QACE,MAAM,eAAe;IAAC;IAE1BA,GAAG,GAAGI,kBAAkB,CAACC,MAAM,CAACC,IAAI,CAACN,GAAG,CAAC,CAAC,CAAC;IAC3CA,GAAG,GAAGO,IAAI,CAACC,KAAK,CAACR,GAAG,CAAC;IACrB,OAAOA,GAAG;EACZ;AAAC"}
1
+ {"version":3,"file":"useKeycloak.native.js","names":["useKeycloak","MultiPlatform","isStorybook","authenticated","ready","login","isLoggedIn","token","logout","refreshToken","useExpoKeycloak","keycloak","ExpoKeycloak","undefined","constructor","tokenParsed","refreshTokenParsed","subject","realmAccess","resourceAccess","decodeToken","sub","realm_access","resource_access","str","split","replace","length","decodeURIComponent","escape","atob","JSON","parse"],"sources":["../../../src/hooks/useKeycloak/useKeycloak.native.ts"],"sourcesContent":["/**\n * File: /src/hooks/useKeycloak/useKeycloak.native.ts\n * Project: app\n * File Created: 08-11-2022 14:10:25\n * Author: Clay Risser\n * -----\n * Last Modified: 26-11-2022 09:05:23\n * Modified By: Clay Risser\n * -----\n * Risser Labs LLC (c) Copyright 2021 - 2022\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport \"core-js/actual/atob\";\nimport \"core-js/actual/escape\";\nimport { AuthRequestPromptOptions, AuthSessionResult } from \"expo-auth-session\";\nimport { IKeycloak } from \"./index\";\nimport {\n KeycloakResourceAccess,\n KeycloakRoles,\n KeycloakTokenParsed,\n} from \"keycloak-js\";\nimport { MultiPlatform } from \"multiplatform.one\";\nimport { useExpoKeycloak } from \"../../expo\";\n\nexport function useKeycloak() {\n if (MultiPlatform.isStorybook()) return { authenticated: true } as IKeycloak;\n const { ready, login, isLoggedIn, token, logout, refreshToken } =\n useExpoKeycloak();\n const keycloak = new ExpoKeycloak(\n ready,\n isLoggedIn,\n login,\n logout,\n token || undefined,\n refreshToken || undefined\n );\n return keycloak as IKeycloak;\n}\n\nexport class ExpoKeycloak implements IKeycloak {\n authenticated?: boolean;\n\n tokenParsed?: KeycloakTokenParsed;\n\n refreshTokenParsed?: KeycloakTokenParsed;\n\n subject?: string;\n\n realmAccess?: KeycloakRoles;\n\n resourceAccess?: KeycloakResourceAccess;\n\n login: () => Promise<unknown> | unknown;\n\n constructor(\n ready: boolean,\n isLoggedIn: boolean | undefined,\n login: (\n options?: AuthRequestPromptOptions\n ) => Promise<AuthSessionResult | undefined>,\n public logout: () => unknown,\n public token?: string,\n public refreshToken?: string\n ) {\n if (ready) this.authenticated = isLoggedIn;\n if (this.authenticated) {\n if (this.token) this.tokenParsed = decodeToken(this.token);\n if (this.refreshToken) {\n this.refreshTokenParsed = decodeToken(this.refreshToken);\n }\n if (this.tokenParsed) {\n this.subject = this.tokenParsed.sub;\n this.realmAccess = this.tokenParsed.realm_access;\n this.resourceAccess = this.tokenParsed.resource_access;\n }\n }\n this.login = () => login();\n }\n}\n\nfunction decodeToken(str: string) {\n str = str.split(\".\")[1];\n str = str.replace(/-/g, \"+\");\n str = str.replace(/_/g, \"/\");\n switch (str.length % 4) {\n case 0:\n break;\n case 2:\n str += \"==\";\n break;\n case 3:\n str += \"=\";\n break;\n default:\n throw \"Invalid token\";\n }\n str = decodeURIComponent(escape(atob(str)));\n str = JSON.parse(str);\n return str as unknown as KeycloakTokenParsed;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;EAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;EAcO,SAASA,WAAW,GAAG;IAC5B,IAAIC,4BAAa,CAACC,WAAW,EAAE,EAAE,OAAO;MAAEC,aAAa,EAAE;IAAK,CAAC;IAC/D,MAAM;MAAEC,KAAK;MAAEC,KAAK;MAAEC,UAAU;MAAEC,KAAK;MAAEC,MAAM;MAAEC;IAAa,CAAC,GAC7D,IAAAC,qBAAe,GAAE;IACnB,MAAMC,QAAQ,GAAG,IAAIC,YAAY,CAC/BR,KAAK,EACLE,UAAU,EACVD,KAAK,EACLG,MAAM,EACND,KAAK,IAAIM,SAAS,EAClBJ,YAAY,IAAII,SAAS,CAC1B;IACD,OAAOF,QAAQ;EACjB;EAEO,MAAMC,YAAY,CAAsB;IAe7CE,WAAW,CACTV,KAAc,EACdE,UAA+B,EAC/BD,KAE2C,EACpCG,MAAqB,EACrBD,KAAc,EACdE,YAAqB,EAC5B;MAAA,KAHOD,MAAqB,GAArBA,MAAqB;MAAA,KACrBD,KAAc,GAAdA,KAAc;MAAA,KACdE,YAAqB,GAArBA,YAAqB;MAAA,KAtB9BN,aAAa;MAAA,KAEbY,WAAW;MAAA,KAEXC,kBAAkB;MAAA,KAElBC,OAAO;MAAA,KAEPC,WAAW;MAAA,KAEXC,cAAc;MAAA,KAEdd,KAAK;MAYH,IAAID,KAAK,EAAE,IAAI,CAACD,aAAa,GAAGG,UAAU;MAC1C,IAAI,IAAI,CAACH,aAAa,EAAE;QACtB,IAAI,IAAI,CAACI,KAAK,EAAE,IAAI,CAACQ,WAAW,GAAGK,WAAW,CAAC,IAAI,CAACb,KAAK,CAAC;QAC1D,IAAI,IAAI,CAACE,YAAY,EAAE;UACrB,IAAI,CAACO,kBAAkB,GAAGI,WAAW,CAAC,IAAI,CAACX,YAAY,CAAC;QAC1D;QACA,IAAI,IAAI,CAACM,WAAW,EAAE;UACpB,IAAI,CAACE,OAAO,GAAG,IAAI,CAACF,WAAW,CAACM,GAAG;UACnC,IAAI,CAACH,WAAW,GAAG,IAAI,CAACH,WAAW,CAACO,YAAY;UAChD,IAAI,CAACH,cAAc,GAAG,IAAI,CAACJ,WAAW,CAACQ,eAAe;QACxD;MACF;MACA,IAAI,CAAClB,KAAK,GAAG,MAAMA,KAAK,EAAE;IAC5B;EACF;EAAC;EAED,SAASe,WAAW,CAACI,GAAW,EAAE;IAChCA,GAAG,GAAGA,GAAG,CAACC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IACvBD,GAAG,GAAGA,GAAG,CAACE,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC;IAC5BF,GAAG,GAAGA,GAAG,CAACE,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC;IAC5B,QAAQF,GAAG,CAACG,MAAM,GAAG,CAAC;MACpB,KAAK,CAAC;QACJ;MACF,KAAK,CAAC;QACJH,GAAG,IAAI,IAAI;QACX;MACF,KAAK,CAAC;QACJA,GAAG,IAAI,GAAG;QACV;MACF;QACE,MAAM,eAAe;IAAC;IAE1BA,GAAG,GAAGI,kBAAkB,CAACC,MAAM,CAACC,IAAI,CAACN,GAAG,CAAC,CAAC,CAAC;IAC3CA,GAAG,GAAGO,IAAI,CAACC,KAAK,CAACR,GAAG,CAAC;IACrB,OAAOA,GAAG;EACZ;AAAC"}
@@ -1,26 +1,22 @@
1
- require("core-js/modules/esnext.global-this.js");
2
- require("core-js/modules/es.object.define-property.js");
3
1
  (function (global, factory) {
4
2
  if (typeof define === "function" && define.amd) {
5
- define(["exports", "core-js/modules/es.function.bind.js", "core-js/modules/es.array.iterator.js", "core-js/modules/es.object.to-string.js", "core-js/modules/es.string.iterator.js", "core-js/modules/web.dom-collections.iterator.js", "core-js/modules/web.url.js", "core-js/modules/web.url-search-params.js", "core-js/modules/es.regexp.exec.js", "core-js/modules/es.string.search.js", "core-js/modules/es.date.to-string.js", "core-js/modules/es.regexp.to-string.js", "core-js/modules/es.array.concat.js", "@babel/runtime/helpers/newArrowCheck", "@risserlabs/solito/router", "multiplatform.one", "./useCurrentRouteName", "./useKeycloak/useKeycloak", "./useAuthConfig"], factory);
3
+ define(["exports", "@risserlabs/solito/router", "multiplatform.one", "./useCurrentRouteName", "./useKeycloak/useKeycloak", "./useAuthConfig"], factory);
6
4
  } else if (typeof exports !== "undefined") {
7
- factory(exports, require("core-js/modules/es.function.bind.js"), require("core-js/modules/es.array.iterator.js"), require("core-js/modules/es.object.to-string.js"), require("core-js/modules/es.string.iterator.js"), require("core-js/modules/web.dom-collections.iterator.js"), require("core-js/modules/web.url.js"), require("core-js/modules/web.url-search-params.js"), require("core-js/modules/es.regexp.exec.js"), require("core-js/modules/es.string.search.js"), require("core-js/modules/es.date.to-string.js"), require("core-js/modules/es.regexp.to-string.js"), require("core-js/modules/es.array.concat.js"), require("@babel/runtime/helpers/newArrowCheck"), require("@risserlabs/solito/router"), require("multiplatform.one"), require("./useCurrentRouteName"), require("./useKeycloak/useKeycloak"), require("./useAuthConfig"));
5
+ factory(exports, require("@risserlabs/solito/router"), require("multiplatform.one"), require("./useCurrentRouteName"), require("./useKeycloak/useKeycloak"), require("./useAuthConfig"));
8
6
  } else {
9
7
  var mod = {
10
8
  exports: {}
11
9
  };
12
- factory(mod.exports, global.esFunctionBind, global.esArrayIterator, global.esObjectToString, global.esStringIterator, global.webDomCollectionsIterator, global.webUrl, global.webUrlSearchParams, global.esRegexpExec, global.esStringSearch, global.esDateToString, global.esRegexpToString, global.esArrayConcat, global.newArrowCheck, global.router, global.multiplatform, global.useCurrentRouteName, global.useKeycloak, global.useAuthConfig);
10
+ factory(mod.exports, global.router, global.multiplatform, global.useCurrentRouteName, global.useKeycloak, global.useAuthConfig);
13
11
  global.useLogin = mod.exports;
14
12
  }
15
- })(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports, _esFunctionBind, _esArrayIterator, _esObjectToString, _esStringIterator, _webDomCollectionsIterator, _webUrl, _webUrlSearchParams, _esRegexpExec, _esStringSearch, _esDateToString, _esRegexpToString, _esArrayConcat, _newArrowCheck2, _router, _multiplatform, _useCurrentRouteName, _useKeycloak, _useAuthConfig) {
13
+ })(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports, _router, _multiplatform, _useCurrentRouteName, _useKeycloak, _useAuthConfig) {
16
14
  "use strict";
17
15
 
18
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
19
16
  Object.defineProperty(_exports, "__esModule", {
20
17
  value: true
21
18
  });
22
19
  _exports.useLogin = useLogin;
23
- _newArrowCheck2 = _interopRequireDefault(_newArrowCheck2);
24
20
  /**
25
21
  * File: /src/hooks/useLogin.ts
26
22
  * Project: app
@@ -46,29 +42,24 @@ require("core-js/modules/es.object.define-property.js");
46
42
  */
47
43
 
48
44
  function useLogin(loginRoute) {
49
- var _this = this;
50
- if (_multiplatform.MultiPlatform.isStorybook()) return function () {
51
- (0, _newArrowCheck2["default"])(this, _this);
52
- return null;
53
- }.bind(this);
54
- var keycloak = (0, _useKeycloak.useKeycloak)();
55
- var authConfig = (0, _useAuthConfig.useAuthConfig)();
56
- var currentRouteName = (0, _useCurrentRouteName.useCurrentRouteName)();
57
- var router = (0, _router.useRouter)();
58
- return function () {
59
- (0, _newArrowCheck2["default"])(this, _this);
45
+ if (_multiplatform.MultiPlatform.isStorybook()) return () => null;
46
+ const keycloak = (0, _useKeycloak.useKeycloak)();
47
+ const authConfig = (0, _useAuthConfig.useAuthConfig)();
48
+ const currentRouteName = (0, _useCurrentRouteName.useCurrentRouteName)();
49
+ const router = (0, _router.useRouter)();
50
+ return () => {
60
51
  if (!loginRoute) loginRoute = authConfig.loginRoute;
61
52
  if (!loginRoute) {
62
53
  keycloak.login();
63
54
  return;
64
55
  }
65
- var url = new URL("x://".concat(loginRoute));
66
- var searchParams = new URLSearchParams(url.search);
56
+ const url = new URL(`x://${loginRoute}`);
57
+ const searchParams = new URLSearchParams(url.search);
67
58
  if (currentRouteName) searchParams.append("backTo", currentRouteName);
68
- var query = searchParams.toString();
69
- if (query.length) query = "?".concat(query);
70
- router.push("".concat(url.pathname.substring(2)).concat(query));
71
- }.bind(this);
59
+ let query = searchParams.toString();
60
+ if (query.length) query = `?${query}`;
61
+ router.push(`${url.pathname.substring(2)}${query}`);
62
+ };
72
63
  }
73
64
  });
74
65
  //# sourceMappingURL=useLogin.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useLogin.js","names":["useLogin","loginRoute","MultiPlatform","isStorybook","keycloak","useKeycloak","authConfig","useAuthConfig","currentRouteName","useCurrentRouteName","router","useRouter","login","url","URL","searchParams","URLSearchParams","search","append","query","toString","length","push","pathname","substring"],"sources":["../../src/hooks/useLogin.ts"],"sourcesContent":["/**\n * File: /src/hooks/useLogin.ts\n * Project: app\n * File Created: 08-11-2022 08:49:14\n * Author: Clay Risser\n * -----\n * Last Modified: 25-11-2022 10:36:32\n * Modified By: Clay Risser\n * -----\n * Risser Labs LLC (c) Copyright 2021 - 2022\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useRouter } from \"@risserlabs/solito/router\";\nimport { MultiPlatform } from \"multiplatform.one\";\nimport { useCurrentRouteName } from \"./useCurrentRouteName\";\nimport { useKeycloak } from \"./useKeycloak/useKeycloak\";\nimport { useAuthConfig } from \"./useAuthConfig\";\n\nexport function useLogin(loginRoute?: string) {\n if (MultiPlatform.isStorybook()) return () => null;\n const keycloak = useKeycloak();\n const authConfig = useAuthConfig();\n const currentRouteName = useCurrentRouteName();\n const router = useRouter();\n return () => {\n if (!loginRoute) loginRoute = authConfig.loginRoute;\n if (!loginRoute) {\n keycloak.login();\n return;\n }\n const url = new URL(`x://${loginRoute}`);\n const searchParams = new URLSearchParams(url.search);\n if (currentRouteName) searchParams.append(\"backTo\", currentRouteName);\n let query = searchParams.toString();\n if (query.length) query = `?${query}`;\n router.push(`${url.pathname.substring(2)}${query}`);\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;EAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;EAQO,SAASA,QAAQ,CAACC,UAAmB,EAAE;IAAA;IAC5C,IAAIC,4BAAa,CAACC,WAAW,EAAE,EAAE,OAAO;MAAA;MAAA,OAAM,IAAI;IAAA;IAClD,IAAMC,QAAQ,GAAG,IAAAC,wBAAW,GAAE;IAC9B,IAAMC,UAAU,GAAG,IAAAC,4BAAa,GAAE;IAClC,IAAMC,gBAAgB,GAAG,IAAAC,wCAAmB,GAAE;IAC9C,IAAMC,MAAM,GAAG,IAAAC,iBAAS,GAAE;IAC1B,OAAO,YAAM;MAAA;MACX,IAAI,CAACV,UAAU,EAAEA,UAAU,GAAGK,UAAU,CAACL,UAAU;MACnD,IAAI,CAACA,UAAU,EAAE;QACfG,QAAQ,CAACQ,KAAK,EAAE;QAChB;MACF;MACA,IAAMC,GAAG,GAAG,IAAIC,GAAG,eAAQb,UAAU,EAAG;MACxC,IAAMc,YAAY,GAAG,IAAIC,eAAe,CAACH,GAAG,CAACI,MAAM,CAAC;MACpD,IAAIT,gBAAgB,EAAEO,YAAY,CAACG,MAAM,CAAC,QAAQ,EAAEV,gBAAgB,CAAC;MACrE,IAAIW,KAAK,GAAGJ,YAAY,CAACK,QAAQ,EAAE;MACnC,IAAID,KAAK,CAACE,MAAM,EAAEF,KAAK,cAAOA,KAAK,CAAE;MACrCT,MAAM,CAACY,IAAI,WAAIT,GAAG,CAACU,QAAQ,CAACC,SAAS,CAAC,CAAC,CAAC,SAAGL,KAAK,EAAG;IACrD,CAAC;EACH;AAAC"}
1
+ {"version":3,"file":"useLogin.js","names":["useLogin","loginRoute","MultiPlatform","isStorybook","keycloak","useKeycloak","authConfig","useAuthConfig","currentRouteName","useCurrentRouteName","router","useRouter","login","url","URL","searchParams","URLSearchParams","search","append","query","toString","length","push","pathname","substring"],"sources":["../../src/hooks/useLogin.ts"],"sourcesContent":["/**\n * File: /src/hooks/useLogin.ts\n * Project: app\n * File Created: 08-11-2022 08:49:14\n * Author: Clay Risser\n * -----\n * Last Modified: 25-11-2022 10:36:32\n * Modified By: Clay Risser\n * -----\n * Risser Labs LLC (c) Copyright 2021 - 2022\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useRouter } from \"@risserlabs/solito/router\";\nimport { MultiPlatform } from \"multiplatform.one\";\nimport { useCurrentRouteName } from \"./useCurrentRouteName\";\nimport { useKeycloak } from \"./useKeycloak/useKeycloak\";\nimport { useAuthConfig } from \"./useAuthConfig\";\n\nexport function useLogin(loginRoute?: string) {\n if (MultiPlatform.isStorybook()) return () => null;\n const keycloak = useKeycloak();\n const authConfig = useAuthConfig();\n const currentRouteName = useCurrentRouteName();\n const router = useRouter();\n return () => {\n if (!loginRoute) loginRoute = authConfig.loginRoute;\n if (!loginRoute) {\n keycloak.login();\n return;\n }\n const url = new URL(`x://${loginRoute}`);\n const searchParams = new URLSearchParams(url.search);\n if (currentRouteName) searchParams.append(\"backTo\", currentRouteName);\n let query = searchParams.toString();\n if (query.length) query = `?${query}`;\n router.push(`${url.pathname.substring(2)}${query}`);\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;EAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;EAQO,SAASA,QAAQ,CAACC,UAAmB,EAAE;IAC5C,IAAIC,4BAAa,CAACC,WAAW,EAAE,EAAE,OAAO,MAAM,IAAI;IAClD,MAAMC,QAAQ,GAAG,IAAAC,wBAAW,GAAE;IAC9B,MAAMC,UAAU,GAAG,IAAAC,4BAAa,GAAE;IAClC,MAAMC,gBAAgB,GAAG,IAAAC,wCAAmB,GAAE;IAC9C,MAAMC,MAAM,GAAG,IAAAC,iBAAS,GAAE;IAC1B,OAAO,MAAM;MACX,IAAI,CAACV,UAAU,EAAEA,UAAU,GAAGK,UAAU,CAACL,UAAU;MACnD,IAAI,CAACA,UAAU,EAAE;QACfG,QAAQ,CAACQ,KAAK,EAAE;QAChB;MACF;MACA,MAAMC,GAAG,GAAG,IAAIC,GAAG,CAAE,OAAMb,UAAW,EAAC,CAAC;MACxC,MAAMc,YAAY,GAAG,IAAIC,eAAe,CAACH,GAAG,CAACI,MAAM,CAAC;MACpD,IAAIT,gBAAgB,EAAEO,YAAY,CAACG,MAAM,CAAC,QAAQ,EAAEV,gBAAgB,CAAC;MACrE,IAAIW,KAAK,GAAGJ,YAAY,CAACK,QAAQ,EAAE;MACnC,IAAID,KAAK,CAACE,MAAM,EAAEF,KAAK,GAAI,IAAGA,KAAM,EAAC;MACrCT,MAAM,CAACY,IAAI,CAAE,GAAET,GAAG,CAACU,QAAQ,CAACC,SAAS,CAAC,CAAC,CAAE,GAAEL,KAAM,EAAC,CAAC;IACrD,CAAC;EACH;AAAC"}
package/lib/index.js CHANGED
@@ -1,9 +1,3 @@
1
- require("core-js/modules/esnext.global-this.js");
2
- require("core-js/modules/es.object.define-property.js");
3
- require("core-js/modules/es.array.for-each.js");
4
- require("core-js/modules/es.object.to-string.js");
5
- require("core-js/modules/web.dom-collections.for-each.js");
6
- require("core-js/modules/es.object.keys.js");
7
1
  (function (global, factory) {
8
2
  if (typeof define === "function" && define.amd) {
9
3
  define(["exports", "./Authenticated", "./authConfig", "./hooks", "./provider"], factory);
@@ -27,7 +21,7 @@ require("core-js/modules/es.object.keys.js");
27
21
  if (key in _exports && _exports[key] === _Authenticated[key]) return;
28
22
  Object.defineProperty(_exports, key, {
29
23
  enumerable: true,
30
- get: function get() {
24
+ get: function () {
31
25
  return _Authenticated[key];
32
26
  }
33
27
  });
@@ -37,7 +31,7 @@ require("core-js/modules/es.object.keys.js");
37
31
  if (key in _exports && _exports[key] === _authConfig[key]) return;
38
32
  Object.defineProperty(_exports, key, {
39
33
  enumerable: true,
40
- get: function get() {
34
+ get: function () {
41
35
  return _authConfig[key];
42
36
  }
43
37
  });
@@ -47,7 +41,7 @@ require("core-js/modules/es.object.keys.js");
47
41
  if (key in _exports && _exports[key] === _hooks[key]) return;
48
42
  Object.defineProperty(_exports, key, {
49
43
  enumerable: true,
50
- get: function get() {
44
+ get: function () {
51
45
  return _hooks[key];
52
46
  }
53
47
  });
@@ -57,7 +51,7 @@ require("core-js/modules/es.object.keys.js");
57
51
  if (key in _exports && _exports[key] === _provider[key]) return;
58
52
  Object.defineProperty(_exports, key, {
59
53
  enumerable: true,
60
- get: function get() {
54
+ get: function () {
61
55
  return _provider[key];
62
56
  }
63
57
  });
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["/**\n * File: /src/index.ts\n * Project: @multiplatform.one/keycloak\n * File Created: 25-11-2022 09:51:55\n * Author: Clay Risser\n * -----\n * Last Modified: 25-11-2022 09:52:06\n * Modified By: Clay Risser\n * -----\n * Risser Labs LLC (c) Copyright 2022\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport * from \"./Authenticated\";\nexport * from \"./authConfig\";\nexport * from \"./hooks\";\nexport * from \"./provider\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;EAwBA;IAAA;IAAA;IAAA;MAAA;MAAA;QAAA;MAAA;IAAA;EAAA;EACA;IAAA;IAAA;IAAA;MAAA;MAAA;QAAA;MAAA;IAAA;EAAA;EACA;IAAA;IAAA;IAAA;MAAA;MAAA;QAAA;MAAA;IAAA;EAAA;EACA;IAAA;IAAA;IAAA;MAAA;MAAA;QAAA;MAAA;IAAA;EAAA;AAA2B"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["/**\n * File: /src/index.ts\n * Project: @multiplatform.one/keycloak\n * File Created: 25-11-2022 09:51:55\n * Author: Clay Risser\n * -----\n * Last Modified: 25-11-2022 09:52:06\n * Modified By: Clay Risser\n * -----\n * Risser Labs LLC (c) Copyright 2022\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport * from \"./Authenticated\";\nexport * from \"./authConfig\";\nexport * from \"./hooks\";\nexport * from \"./provider\";\n"],"mappings":";;;;;;;;;;;;;;;;;;EAwBA;IAAA;IAAA;IAAA;MAAA;MAAA;QAAA;MAAA;IAAA;EAAA;EACA;IAAA;IAAA;IAAA;MAAA;MAAA;QAAA;MAAA;IAAA;EAAA;EACA;IAAA;IAAA;IAAA;MAAA;MAAA;QAAA;MAAA;IAAA;EAAA;EACA;IAAA;IAAA;IAAA;MAAA;MAAA;QAAA;MAAA;IAAA;EAAA;AAA2B"}