@multiplatform.one/keycloak 0.7.2 → 0.7.4

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 (124) hide show
  1. package/LICENSE +201 -0
  2. package/lib/@types/coreJsPure.d.d.mts +2 -0
  3. package/lib/@types/expoKeycloakAuth.d.d.mts +25 -0
  4. package/lib/@types/expoKeycloakAuth.d.d.ts +16 -19
  5. package/lib/Authenticated.d.mts +33 -0
  6. package/lib/Authenticated.d.ts +4 -7
  7. package/lib/Authenticated.js +6 -6
  8. package/lib/Authenticated.mjs +4 -4
  9. package/lib/authConfig.d.mts +14 -0
  10. package/lib/authConfig.d.ts +0 -23
  11. package/lib/authConfig.js +1 -1
  12. package/lib/authConfig.mjs +1 -1
  13. package/lib/{chunk-JYEIPNPN.mjs → chunk-AOKVCTMY.mjs} +1 -1
  14. package/lib/{chunk-73FF4BX7.js → chunk-BJ2OPIMW.js} +4 -4
  15. package/lib/{chunk-QFP2JWHZ.js → chunk-BTCP7NB3.js} +3 -3
  16. package/lib/{chunk-DJW5IKQS.mjs → chunk-DKRUDENY.mjs} +1 -1
  17. package/lib/{chunk-S3M2DZ6G.js → chunk-E2X33LSD.js} +2 -2
  18. package/lib/{chunk-RTZ3CZKS.js → chunk-FXGWERIA.js} +2 -2
  19. package/lib/{chunk-NRD376XV.js → chunk-HDNHCVXT.js} +2 -2
  20. package/lib/{chunk-BTHRDOLL.mjs → chunk-NU2SJ3ST.mjs} +1 -1
  21. package/lib/{chunk-K2MQYDVB.mjs → chunk-SK4YK6KE.mjs} +1 -1
  22. package/lib/{chunk-JLIMB5OD.js → chunk-UBCNCE73.js} +2 -2
  23. package/lib/{chunk-6QZDLO3M.mjs → chunk-VLUTEDDM.mjs} +1 -1
  24. package/lib/{chunk-CLO6HIJN.mjs → chunk-ZVG3OFME.mjs} +2 -2
  25. package/lib/hooks/index.d.mts +9 -0
  26. package/lib/hooks/index.js +6 -6
  27. package/lib/hooks/index.mjs +3 -3
  28. package/lib/hooks/useAuthConfig.d.mts +6 -0
  29. package/lib/hooks/useAuthConfig.d.ts +0 -23
  30. package/lib/hooks/useAuthConfig.js +1 -1
  31. package/lib/hooks/useAuthConfig.mjs +1 -1
  32. package/lib/hooks/useCurrentRouteName/index.d.mts +3 -0
  33. package/lib/hooks/useCurrentRouteName/index.d.ts +0 -23
  34. package/lib/hooks/useCurrentRouteName/index.js +1 -1
  35. package/lib/hooks/useCurrentRouteName/index.mjs +1 -1
  36. package/lib/hooks/useCurrentRouteName/index.native.d.mts +3 -0
  37. package/lib/hooks/useCurrentRouteName/index.native.d.ts +0 -23
  38. package/lib/hooks/useCurrentRouteName/index.native.js +1 -1
  39. package/lib/hooks/useCurrentRouteName/index.native.mjs +1 -1
  40. package/lib/hooks/useKeycloak/index.d.mts +46 -0
  41. package/lib/hooks/useKeycloak/index.d.ts +0 -24
  42. package/lib/hooks/useKeycloak/index.js +4 -4
  43. package/lib/hooks/useKeycloak/index.mjs +2 -2
  44. package/lib/hooks/useKeycloak/useKeycloak.d.mts +2 -0
  45. package/lib/hooks/useKeycloak/useKeycloak.js +4 -4
  46. package/lib/hooks/useKeycloak/useKeycloak.mjs +2 -2
  47. package/lib/hooks/useKeycloak/useKeycloak.native.d.mts +20 -0
  48. package/lib/hooks/useKeycloak/useKeycloak.native.d.ts +0 -24
  49. package/lib/hooks/useKeycloak/useKeycloak.native.js +8 -8
  50. package/lib/hooks/useKeycloak/useKeycloak.native.mjs +1 -1
  51. package/lib/hooks/useLogin.d.mts +3 -0
  52. package/lib/hooks/useLogin.d.ts +0 -23
  53. package/lib/hooks/useLogin.js +4 -4
  54. package/lib/hooks/useLogin.mjs +3 -3
  55. package/lib/hooks/useTokensFromQuery/index.d.mts +3 -0
  56. package/lib/hooks/useTokensFromQuery/index.d.ts +0 -23
  57. package/lib/hooks/useTokensFromQuery/index.js +1 -1
  58. package/lib/hooks/useTokensFromQuery/index.mjs +1 -1
  59. package/lib/hooks/useTokensFromQuery/index.native.d.mts +3 -0
  60. package/lib/hooks/useTokensFromQuery/index.native.d.ts +0 -23
  61. package/lib/hooks/useTokensFromQuery/index.native.js +1 -1
  62. package/lib/hooks/useTokensFromQuery/index.native.mjs +1 -1
  63. package/lib/hooks/useTokensFromState.d.mts +3 -0
  64. package/lib/hooks/useTokensFromState.d.ts +0 -23
  65. package/lib/hooks/useTokensFromState.js +1 -1
  66. package/lib/hooks/useTokensFromState.mjs +1 -1
  67. package/lib/index.d.mts +13 -0
  68. package/lib/index.js +15 -15
  69. package/lib/index.mjs +7 -7
  70. package/lib/provider/afterAuth.d.mts +29 -0
  71. package/lib/provider/afterAuth.d.ts +4 -7
  72. package/lib/provider/afterAuth.js +5 -5
  73. package/lib/provider/afterAuth.mjs +4 -4
  74. package/lib/provider/index.d.mts +39 -0
  75. package/lib/provider/index.d.ts +4 -7
  76. package/lib/provider/index.js +9 -9
  77. package/lib/provider/index.mjs +6 -6
  78. package/lib/provider/keycloakProvider.d.mts +42 -0
  79. package/lib/provider/keycloakProvider.d.ts +4 -7
  80. package/lib/provider/keycloakProvider.js +7 -7
  81. package/lib/provider/keycloakProvider.mjs +5 -5
  82. package/lib/provider/keycloakProvider.native.d.mts +29 -0
  83. package/lib/provider/keycloakProvider.native.d.ts +4 -7
  84. package/lib/provider/keycloakProvider.native.js +5 -5
  85. package/lib/provider/keycloakProvider.native.mjs +4 -4
  86. package/lib/state/index.d.mts +11 -0
  87. package/lib/state/index.d.ts +0 -23
  88. package/lib/state/index.js +1 -1
  89. package/lib/state/index.mjs +1 -1
  90. package/lib/types.d.mts +17 -0
  91. package/lib/types.d.ts +0 -23
  92. package/lib/types.js +1 -1
  93. package/lib/types.mjs +1 -1
  94. package/lib/util.d.mts +4 -0
  95. package/lib/util.d.ts +0 -23
  96. package/lib/util.js +1 -1
  97. package/lib/util.mjs +1 -1
  98. package/package.json +21 -37
  99. package/src/@types/coreJsPure.d.ts +16 -19
  100. package/src/@types/expoKeycloakAuth.d.ts +16 -19
  101. package/src/Authenticated.tsx +4 -7
  102. package/src/authConfig.ts +16 -19
  103. package/src/hooks/index.ts +16 -19
  104. package/src/hooks/useAuthConfig.ts +16 -19
  105. package/src/hooks/useCurrentRouteName/index.native.ts +16 -19
  106. package/src/hooks/useCurrentRouteName/index.ts +16 -19
  107. package/src/hooks/useKeycloak/index.ts +16 -19
  108. package/src/hooks/useKeycloak/useKeycloak.native.ts +16 -19
  109. package/src/hooks/useKeycloak/useKeycloak.ts +16 -19
  110. package/src/hooks/useLogin.ts +16 -19
  111. package/src/hooks/useTokensFromQuery/index.native.ts +16 -19
  112. package/src/hooks/useTokensFromQuery/index.ts +16 -19
  113. package/src/hooks/useTokensFromState.ts +16 -19
  114. package/src/index.ts +16 -19
  115. package/src/provider/afterAuth.tsx +4 -7
  116. package/src/provider/index.tsx +4 -7
  117. package/src/provider/keycloakProvider.native.tsx +4 -7
  118. package/src/provider/keycloakProvider.tsx +4 -7
  119. package/src/state/index.ts +16 -19
  120. package/src/types.ts +16 -19
  121. package/src/util.ts +16 -19
  122. package/README.md +0 -3
  123. /package/lib/{chunk-XXPGZHWZ.js → chunk-KMAXXKJT.js} +0 -0
  124. /package/lib/{chunk-NHABU752.mjs → chunk-S237YNYQ.mjs} +0 -0
@@ -5,19 +5,19 @@ Object.defineProperty(exports, "__esModule", {
5
5
  require("../chunk-UBVYEZI3.js");
6
6
  require("../chunk-6NDWOV55.js");
7
7
  var _chunkKLLABHICjs = require("../chunk-KLLABHIC.js");
8
- var _chunkNRD376XVjs = require("../chunk-NRD376XV.js");
8
+ var _chunkHDNHCVXTjs = require("../chunk-HDNHCVXT.js");
9
9
  var _chunkOYWAYMFNjs = require("../chunk-OYWAYMFN.js");
10
- var _chunkS3M2DZ6Gjs = require("../chunk-S3M2DZ6G.js");
10
+ var _chunkE2X33LSDjs = require("../chunk-E2X33LSD.js");
11
11
  var _chunk3ZPHNEJLjs = require("../chunk-3ZPHNEJL.js");
12
12
  var _chunkYGNNHTFEjs = require("../chunk-YGNNHTFE.js");
13
13
  require("../chunk-C2FNSVJO.js");
14
14
  require("../chunk-A7UBOIAL.js");
15
15
  require("../chunk-NWRANDZ6.js");
16
- require("../chunk-XXPGZHWZ.js");
17
- exports.Keycloak = _chunkS3M2DZ6Gjs.Keycloak;
16
+ require("../chunk-KMAXXKJT.js");
17
+ exports.Keycloak = _chunkE2X33LSDjs.Keycloak;
18
18
  exports.useAuthConfig = _chunk3ZPHNEJLjs.useAuthConfig;
19
19
  exports.useCurrentRouteName = _chunkOYWAYMFNjs.useCurrentRouteName;
20
- exports.useKeycloak = _chunkS3M2DZ6Gjs.useKeycloak;
21
- exports.useLogin = _chunkNRD376XVjs.useLogin;
20
+ exports.useKeycloak = _chunkE2X33LSDjs.useKeycloak;
21
+ exports.useLogin = _chunkHDNHCVXTjs.useLogin;
22
22
  exports.useTokensFromQuery = _chunkKLLABHICjs.useTokensFromQuery;
23
23
  exports.useTokensFromState = _chunkYGNNHTFEjs.useTokensFromState;
@@ -5,14 +5,14 @@ import {
5
5
  } from "../chunk-NXTVYIBR.mjs";
6
6
  import {
7
7
  useLogin
8
- } from "../chunk-6QZDLO3M.mjs";
8
+ } from "../chunk-VLUTEDDM.mjs";
9
9
  import {
10
10
  useCurrentRouteName
11
11
  } from "../chunk-L5HMOY4M.mjs";
12
12
  import {
13
13
  Keycloak,
14
14
  useKeycloak
15
- } from "../chunk-BTHRDOLL.mjs";
15
+ } from "../chunk-NU2SJ3ST.mjs";
16
16
  import {
17
17
  useAuthConfig
18
18
  } from "../chunk-Y4XMF3R6.mjs";
@@ -22,7 +22,7 @@ import {
22
22
  import "../chunk-AD6VPMID.mjs";
23
23
  import "../chunk-64PPU7Q3.mjs";
24
24
  import "../chunk-7MTPH6XK.mjs";
25
- import "../chunk-NHABU752.mjs";
25
+ import "../chunk-S237YNYQ.mjs";
26
26
  export {
27
27
  Keycloak,
28
28
  useAuthConfig,
@@ -0,0 +1,6 @@
1
+ import { AuthConfig } from '../authConfig.mjs';
2
+ import 'react';
3
+
4
+ declare function useAuthConfig(): AuthConfig;
5
+
6
+ export { useAuthConfig };
@@ -1,29 +1,6 @@
1
1
  import { AuthConfig } from '../authConfig.js';
2
2
  import 'react';
3
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
4
  declare function useAuthConfig(): AuthConfig;
28
5
 
29
6
  export { useAuthConfig };
@@ -4,5 +4,5 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  var _chunk3ZPHNEJLjs = require("../chunk-3ZPHNEJL.js");
6
6
  require("../chunk-A7UBOIAL.js");
7
- require("../chunk-XXPGZHWZ.js");
7
+ require("../chunk-KMAXXKJT.js");
8
8
  exports.useAuthConfig = _chunk3ZPHNEJLjs.useAuthConfig;
@@ -2,7 +2,7 @@ import {
2
2
  useAuthConfig
3
3
  } from "../chunk-Y4XMF3R6.mjs";
4
4
  import "../chunk-64PPU7Q3.mjs";
5
- import "../chunk-NHABU752.mjs";
5
+ import "../chunk-S237YNYQ.mjs";
6
6
  export {
7
7
  useAuthConfig
8
8
  };
@@ -0,0 +1,3 @@
1
+ declare function useCurrentRouteName(): string | null;
2
+
3
+ export { useCurrentRouteName };
@@ -1,26 +1,3 @@
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
1
  declare function useCurrentRouteName(): string | null;
25
2
 
26
3
  export { useCurrentRouteName };
@@ -3,5 +3,5 @@ Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
5
  var _chunkOYWAYMFNjs = require("../../chunk-OYWAYMFN.js");
6
- require("../../chunk-XXPGZHWZ.js");
6
+ require("../../chunk-KMAXXKJT.js");
7
7
  exports.useCurrentRouteName = _chunkOYWAYMFNjs.useCurrentRouteName;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  useCurrentRouteName
3
3
  } from "../../chunk-L5HMOY4M.mjs";
4
- import "../../chunk-NHABU752.mjs";
4
+ import "../../chunk-S237YNYQ.mjs";
5
5
  export {
6
6
  useCurrentRouteName
7
7
  };
@@ -0,0 +1,3 @@
1
+ declare function useCurrentRouteName(): string | null;
2
+
3
+ export { useCurrentRouteName };
@@ -1,26 +1,3 @@
1
- /**
2
- * File: /src/hooks/useCurrentRouteName/index.native.ts
3
- * Project: @multiplatform.one/keycloak
4
- * File Created: 24-02-2023 06:30:36
5
- * Author: Clay Risser
6
- * -----
7
- * Last Modified: 24-02-2023 06:31:25
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
1
  declare function useCurrentRouteName(): string | null;
25
2
 
26
3
  export { useCurrentRouteName };
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- require("../../chunk-XXPGZHWZ.js");
5
+ require("../../chunk-KMAXXKJT.js");
6
6
  // src/hooks/useCurrentRouteName/index.native.ts
7
7
  var _multiplatformone = require("multiplatform.one");
8
8
  var _native = require("@react-navigation/native");
@@ -1,4 +1,4 @@
1
- import "../../chunk-NHABU752.mjs";
1
+ import "../../chunk-S237YNYQ.mjs";
2
2
 
3
3
  // src/hooks/useCurrentRouteName/index.native.ts
4
4
  import { MultiPlatform } from "multiplatform.one";
@@ -0,0 +1,46 @@
1
+ import * as _bitspur_keycloak_js from '@bitspur/keycloak-js';
2
+ import { KeycloakRoles, KeycloakTokenParsed, KeycloakResourceAccess } from '@bitspur/keycloak-js';
3
+
4
+ declare function useKeycloak(): Keycloak;
5
+ declare class Keycloak implements IKeycloak {
6
+ private readonly keycloak;
7
+ authenticated?: boolean;
8
+ constructor(keycloak: IKeycloak | undefined, initialized: boolean);
9
+ get idToken(): string | undefined;
10
+ get realmAccess(): _bitspur_keycloak_js.KeycloakRoles | undefined;
11
+ get refreshToken(): string | undefined;
12
+ get refreshTokenParsed(): _bitspur_keycloak_js.KeycloakTokenParsed | undefined;
13
+ get resourceAccess(): _bitspur_keycloak_js.KeycloakResourceAccess | undefined;
14
+ get subject(): string | undefined;
15
+ get token(): string | undefined;
16
+ get tokenParsed(): ITokenParsed | undefined;
17
+ get email(): any;
18
+ get username(): string | undefined;
19
+ login(): Promise<unknown>;
20
+ logout(): Promise<unknown>;
21
+ }
22
+
23
+ interface IKeycloak {
24
+ authenticated?: boolean;
25
+ idToken?: string;
26
+ realmAccess?: KeycloakRoles;
27
+ refreshToken?: string;
28
+ refreshTokenParsed?: KeycloakTokenParsed;
29
+ resourceAccess?: KeycloakResourceAccess;
30
+ subject?: string;
31
+ token?: string;
32
+ tokenParsed?: ITokenParsed;
33
+ email?: string;
34
+ username?: string;
35
+ login: () => Promise<unknown>;
36
+ logout: () => Promise<unknown>;
37
+ }
38
+ interface ITokenParsed extends KeycloakTokenParsed {
39
+ 'allowed-origins'?: string[];
40
+ email_verified?: boolean;
41
+ preferred_username?: string;
42
+ scope?: string;
43
+ sid?: string;
44
+ }
45
+
46
+ export { IKeycloak, ITokenParsed, Keycloak, useKeycloak };
@@ -20,30 +20,6 @@ declare class Keycloak implements IKeycloak {
20
20
  logout(): Promise<unknown>;
21
21
  }
22
22
 
23
- /**
24
- * File: /src/hooks/useKeycloak/index.ts
25
- * Project: app
26
- * File Created: 08-11-2022 14:10:44
27
- * Author: Clay Risser
28
- * -----
29
- * Last Modified: 01-06-2023 13:55:42
30
- * Modified By: Clay Risser
31
- * -----
32
- * Risser Labs LLC (c) Copyright 2021 - 2022
33
- *
34
- * Licensed under the Apache License, Version 2.0 (the "License");
35
- * you may not use this file except in compliance with the License.
36
- * You may obtain a copy of the License at
37
- *
38
- * http://www.apache.org/licenses/LICENSE-2.0
39
- *
40
- * Unless required by applicable law or agreed to in writing, software
41
- * distributed under the License is distributed on an "AS IS" BASIS,
42
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
43
- * See the License for the specific language governing permissions and
44
- * limitations under the License.
45
- */
46
-
47
23
  interface IKeycloak {
48
24
  authenticated?: boolean;
49
25
  idToken?: string;
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
5
  require("../../chunk-6NDWOV55.js");
6
- var _chunkS3M2DZ6Gjs = require("../../chunk-S3M2DZ6G.js");
6
+ var _chunkE2X33LSDjs = require("../../chunk-E2X33LSD.js");
7
7
  require("../../chunk-3ZPHNEJL.js");
8
8
  require("../../chunk-A7UBOIAL.js");
9
- require("../../chunk-XXPGZHWZ.js");
10
- exports.Keycloak = _chunkS3M2DZ6Gjs.Keycloak;
11
- exports.useKeycloak = _chunkS3M2DZ6Gjs.useKeycloak;
9
+ require("../../chunk-KMAXXKJT.js");
10
+ exports.Keycloak = _chunkE2X33LSDjs.Keycloak;
11
+ exports.useKeycloak = _chunkE2X33LSDjs.useKeycloak;
@@ -2,10 +2,10 @@ import "../../chunk-2GUOEPFY.mjs";
2
2
  import {
3
3
  Keycloak,
4
4
  useKeycloak
5
- } from "../../chunk-BTHRDOLL.mjs";
5
+ } from "../../chunk-NU2SJ3ST.mjs";
6
6
  import "../../chunk-Y4XMF3R6.mjs";
7
7
  import "../../chunk-64PPU7Q3.mjs";
8
- import "../../chunk-NHABU752.mjs";
8
+ import "../../chunk-S237YNYQ.mjs";
9
9
  export {
10
10
  Keycloak,
11
11
  useKeycloak
@@ -0,0 +1,2 @@
1
+ export { Keycloak, useKeycloak } from './index.mjs';
2
+ import '@bitspur/keycloak-js';
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- var _chunkS3M2DZ6Gjs = require("../../chunk-S3M2DZ6G.js");
5
+ var _chunkE2X33LSDjs = require("../../chunk-E2X33LSD.js");
6
6
  require("../../chunk-3ZPHNEJL.js");
7
7
  require("../../chunk-A7UBOIAL.js");
8
- require("../../chunk-XXPGZHWZ.js");
9
- exports.Keycloak = _chunkS3M2DZ6Gjs.Keycloak;
10
- exports.useKeycloak = _chunkS3M2DZ6Gjs.useKeycloak;
8
+ require("../../chunk-KMAXXKJT.js");
9
+ exports.Keycloak = _chunkE2X33LSDjs.Keycloak;
10
+ exports.useKeycloak = _chunkE2X33LSDjs.useKeycloak;
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  Keycloak,
3
3
  useKeycloak
4
- } from "../../chunk-BTHRDOLL.mjs";
4
+ } from "../../chunk-NU2SJ3ST.mjs";
5
5
  import "../../chunk-Y4XMF3R6.mjs";
6
6
  import "../../chunk-64PPU7Q3.mjs";
7
- import "../../chunk-NHABU752.mjs";
7
+ import "../../chunk-S237YNYQ.mjs";
8
8
  export {
9
9
  Keycloak,
10
10
  useKeycloak
@@ -0,0 +1,20 @@
1
+ import { AuthRequestPromptOptions, AuthSessionResult } from 'expo-auth-session';
2
+ import { IKeycloak } from './index.mjs';
3
+ import { KeycloakTokenParsed, KeycloakRoles, KeycloakResourceAccess } from '@bitspur/keycloak-js';
4
+
5
+ declare function useKeycloak(): IKeycloak;
6
+ declare class ExpoKeycloak implements IKeycloak {
7
+ logout: () => Promise<unknown>;
8
+ token?: string | undefined;
9
+ refreshToken?: string | undefined;
10
+ authenticated?: boolean;
11
+ tokenParsed?: KeycloakTokenParsed;
12
+ refreshTokenParsed?: KeycloakTokenParsed;
13
+ subject?: string;
14
+ realmAccess?: KeycloakRoles;
15
+ resourceAccess?: KeycloakResourceAccess;
16
+ login: () => Promise<unknown>;
17
+ constructor(ready: boolean, isLoggedIn: boolean | undefined, login: (options?: AuthRequestPromptOptions) => Promise<AuthSessionResult | undefined>, logout: () => Promise<unknown>, token?: string | undefined, refreshToken?: string | undefined);
18
+ }
19
+
20
+ export { ExpoKeycloak, useKeycloak };
@@ -2,30 +2,6 @@ import { AuthRequestPromptOptions, AuthSessionResult } from 'expo-auth-session';
2
2
  import { IKeycloak } from './index.js';
3
3
  import { KeycloakTokenParsed, KeycloakRoles, KeycloakResourceAccess } from '@bitspur/keycloak-js';
4
4
 
5
- /**
6
- * File: /src/hooks/useKeycloak/useKeycloak.native.ts
7
- * Project: app
8
- * File Created: 08-11-2022 14:10:25
9
- * Author: Clay Risser
10
- * -----
11
- * Last Modified: 01-06-2023 14:04:46
12
- * Modified By: Clay Risser
13
- * -----
14
- * Risser Labs LLC (c) Copyright 2021 - 2022
15
- *
16
- * Licensed under the Apache License, Version 2.0 (the "License");
17
- * you may not use this file except in compliance with the License.
18
- * You may obtain a copy of the License at
19
- *
20
- * http://www.apache.org/licenses/LICENSE-2.0
21
- *
22
- * Unless required by applicable law or agreed to in writing, software
23
- * distributed under the License is distributed on an "AS IS" BASIS,
24
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25
- * See the License for the specific language governing permissions and
26
- * limitations under the License.
27
- */
28
-
29
5
  declare function useKeycloak(): IKeycloak;
30
6
  declare class ExpoKeycloak implements IKeycloak {
31
7
  logout: () => Promise<unknown>;
@@ -12,7 +12,7 @@ function _interopRequireDefault(obj) {
12
12
  default: obj
13
13
  };
14
14
  }
15
- var _chunkXXPGZHWZjs = require("../../chunk-XXPGZHWZ.js");
15
+ var _chunkKMAXXKJTjs = require("../../chunk-KMAXXKJT.js");
16
16
  // src/hooks/useKeycloak/useKeycloak.native.ts
17
17
  var _atob = require("core-js-pure/stable/atob");
18
18
  var _atob2 = _interopRequireDefault(_atob);
@@ -33,13 +33,13 @@ var ExpoKeycloak = function ExpoKeycloak(ready, isLoggedIn, login, logout, token
33
33
  this.logout = logout;
34
34
  this.token = token;
35
35
  this.refreshToken = refreshToken;
36
- _chunkXXPGZHWZjs.__publicField.call(void 0, this, "authenticated");
37
- _chunkXXPGZHWZjs.__publicField.call(void 0, this, "tokenParsed");
38
- _chunkXXPGZHWZjs.__publicField.call(void 0, this, "refreshTokenParsed");
39
- _chunkXXPGZHWZjs.__publicField.call(void 0, this, "subject");
40
- _chunkXXPGZHWZjs.__publicField.call(void 0, this, "realmAccess");
41
- _chunkXXPGZHWZjs.__publicField.call(void 0, this, "resourceAccess");
42
- _chunkXXPGZHWZjs.__publicField.call(void 0, this, "login");
36
+ _chunkKMAXXKJTjs.__publicField.call(void 0, this, "authenticated");
37
+ _chunkKMAXXKJTjs.__publicField.call(void 0, this, "tokenParsed");
38
+ _chunkKMAXXKJTjs.__publicField.call(void 0, this, "refreshTokenParsed");
39
+ _chunkKMAXXKJTjs.__publicField.call(void 0, this, "subject");
40
+ _chunkKMAXXKJTjs.__publicField.call(void 0, this, "realmAccess");
41
+ _chunkKMAXXKJTjs.__publicField.call(void 0, this, "resourceAccess");
42
+ _chunkKMAXXKJTjs.__publicField.call(void 0, this, "login");
43
43
  if (ready) this.authenticated = isLoggedIn;
44
44
  if (this.authenticated) {
45
45
  if (this.token) this.tokenParsed = decodeToken(this.token);
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  __publicField
3
- } from "../../chunk-NHABU752.mjs";
3
+ } from "../../chunk-S237YNYQ.mjs";
4
4
 
5
5
  // src/hooks/useKeycloak/useKeycloak.native.ts
6
6
  import atob from "core-js-pure/stable/atob";
@@ -0,0 +1,3 @@
1
+ declare function useLogin(loginRoute?: string): () => void;
2
+
3
+ export { useLogin };
@@ -1,26 +1,3 @@
1
- /**
2
- * File: /src/hooks/useLogin.ts
3
- * Project: app
4
- * File Created: 08-11-2022 08:49:14
5
- * Author: Clay Risser
6
- * -----
7
- * Last Modified: 25-04-2023 23:09:10
8
- * Modified By: Clay Risser
9
- * -----
10
- * Risser Labs LLC (c) Copyright 2021 - 2022
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
1
  declare function useLogin(loginRoute?: string): () => void;
25
2
 
26
3
  export { useLogin };
@@ -2,10 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- var _chunkNRD376XVjs = require("../chunk-NRD376XV.js");
5
+ var _chunkHDNHCVXTjs = require("../chunk-HDNHCVXT.js");
6
6
  require("../chunk-OYWAYMFN.js");
7
- require("../chunk-S3M2DZ6G.js");
7
+ require("../chunk-E2X33LSD.js");
8
8
  require("../chunk-3ZPHNEJL.js");
9
9
  require("../chunk-A7UBOIAL.js");
10
- require("../chunk-XXPGZHWZ.js");
11
- exports.useLogin = _chunkNRD376XVjs.useLogin;
10
+ require("../chunk-KMAXXKJT.js");
11
+ exports.useLogin = _chunkHDNHCVXTjs.useLogin;
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  useLogin
3
- } from "../chunk-6QZDLO3M.mjs";
3
+ } from "../chunk-VLUTEDDM.mjs";
4
4
  import "../chunk-L5HMOY4M.mjs";
5
- import "../chunk-BTHRDOLL.mjs";
5
+ import "../chunk-NU2SJ3ST.mjs";
6
6
  import "../chunk-Y4XMF3R6.mjs";
7
7
  import "../chunk-64PPU7Q3.mjs";
8
- import "../chunk-NHABU752.mjs";
8
+ import "../chunk-S237YNYQ.mjs";
9
9
  export {
10
10
  useLogin
11
11
  };
@@ -0,0 +1,3 @@
1
+ declare function useTokensFromQuery(): boolean;
2
+
3
+ export { useTokensFromQuery };
@@ -1,26 +1,3 @@
1
- /**
2
- * File: /src/hooks/useTokensFromQuery/index.ts
3
- * Project: @multiplatform.one/keycloak
4
- * File Created: 15-05-2023 01:54:44
5
- * Author: Clay Risser
6
- * -----
7
- * Last Modified: 16-05-2023 07:40:41
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
1
  declare function useTokensFromQuery(): boolean;
25
2
 
26
3
  export { useTokensFromQuery };
@@ -3,5 +3,5 @@ Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
5
  var _chunkKLLABHICjs = require("../../chunk-KLLABHIC.js");
6
- require("../../chunk-XXPGZHWZ.js");
6
+ require("../../chunk-KMAXXKJT.js");
7
7
  exports.useTokensFromQuery = _chunkKLLABHICjs.useTokensFromQuery;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  useTokensFromQuery
3
3
  } from "../../chunk-NXTVYIBR.mjs";
4
- import "../../chunk-NHABU752.mjs";
4
+ import "../../chunk-S237YNYQ.mjs";
5
5
  export {
6
6
  useTokensFromQuery
7
7
  };
@@ -0,0 +1,3 @@
1
+ declare const useTokensFromQuery: () => boolean;
2
+
3
+ export { useTokensFromQuery };
@@ -1,26 +1,3 @@
1
- /**
2
- * File: /src/hooks/useTokensFromQuery/index.native.ts
3
- * Project: @multiplatform.one/keycloak
4
- * File Created: 15-05-2023 01:54:48
5
- * Author: Clay Risser
6
- * -----
7
- * Last Modified: 16-05-2023 07:40:46
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
1
  declare const useTokensFromQuery: () => boolean;
25
2
 
26
3
  export { useTokensFromQuery };
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- require("../../chunk-XXPGZHWZ.js");
5
+ require("../../chunk-KMAXXKJT.js");
6
6
  // src/hooks/useTokensFromQuery/index.native.ts
7
7
  var useTokensFromQuery = function() {
8
8
  return false;
@@ -1,4 +1,4 @@
1
- import "../../chunk-NHABU752.mjs";
1
+ import "../../chunk-S237YNYQ.mjs";
2
2
 
3
3
  // src/hooks/useTokensFromQuery/index.native.ts
4
4
  var useTokensFromQuery = () => false;
@@ -0,0 +1,3 @@
1
+ declare function useTokensFromState(): boolean;
2
+
3
+ export { useTokensFromState };
@@ -1,26 +1,3 @@
1
- /**
2
- * File: /src/hooks/useTokensFromState.ts
3
- * Project: @multiplatform.one/keycloak
4
- * File Created: 16-05-2023 06:29:02
5
- * Author: Clay Risser
6
- * -----
7
- * Last Modified: 16-05-2023 07:40:36
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
1
  declare function useTokensFromState(): boolean;
25
2
 
26
3
  export { useTokensFromState };