@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.
- package/LICENSE +201 -0
- package/lib/@types/coreJsPure.d.d.mts +2 -0
- package/lib/@types/expoKeycloakAuth.d.d.mts +25 -0
- package/lib/@types/expoKeycloakAuth.d.d.ts +16 -19
- package/lib/Authenticated.d.mts +33 -0
- package/lib/Authenticated.d.ts +4 -7
- package/lib/Authenticated.js +6 -6
- package/lib/Authenticated.mjs +4 -4
- package/lib/authConfig.d.mts +14 -0
- package/lib/authConfig.d.ts +0 -23
- package/lib/authConfig.js +1 -1
- package/lib/authConfig.mjs +1 -1
- package/lib/{chunk-JYEIPNPN.mjs → chunk-AOKVCTMY.mjs} +1 -1
- package/lib/{chunk-73FF4BX7.js → chunk-BJ2OPIMW.js} +4 -4
- package/lib/{chunk-QFP2JWHZ.js → chunk-BTCP7NB3.js} +3 -3
- package/lib/{chunk-DJW5IKQS.mjs → chunk-DKRUDENY.mjs} +1 -1
- package/lib/{chunk-S3M2DZ6G.js → chunk-E2X33LSD.js} +2 -2
- package/lib/{chunk-RTZ3CZKS.js → chunk-FXGWERIA.js} +2 -2
- package/lib/{chunk-NRD376XV.js → chunk-HDNHCVXT.js} +2 -2
- package/lib/{chunk-BTHRDOLL.mjs → chunk-NU2SJ3ST.mjs} +1 -1
- package/lib/{chunk-K2MQYDVB.mjs → chunk-SK4YK6KE.mjs} +1 -1
- package/lib/{chunk-JLIMB5OD.js → chunk-UBCNCE73.js} +2 -2
- package/lib/{chunk-6QZDLO3M.mjs → chunk-VLUTEDDM.mjs} +1 -1
- package/lib/{chunk-CLO6HIJN.mjs → chunk-ZVG3OFME.mjs} +2 -2
- package/lib/hooks/index.d.mts +9 -0
- package/lib/hooks/index.js +6 -6
- package/lib/hooks/index.mjs +3 -3
- package/lib/hooks/useAuthConfig.d.mts +6 -0
- package/lib/hooks/useAuthConfig.d.ts +0 -23
- package/lib/hooks/useAuthConfig.js +1 -1
- package/lib/hooks/useAuthConfig.mjs +1 -1
- package/lib/hooks/useCurrentRouteName/index.d.mts +3 -0
- package/lib/hooks/useCurrentRouteName/index.d.ts +0 -23
- package/lib/hooks/useCurrentRouteName/index.js +1 -1
- package/lib/hooks/useCurrentRouteName/index.mjs +1 -1
- package/lib/hooks/useCurrentRouteName/index.native.d.mts +3 -0
- package/lib/hooks/useCurrentRouteName/index.native.d.ts +0 -23
- package/lib/hooks/useCurrentRouteName/index.native.js +1 -1
- package/lib/hooks/useCurrentRouteName/index.native.mjs +1 -1
- package/lib/hooks/useKeycloak/index.d.mts +46 -0
- package/lib/hooks/useKeycloak/index.d.ts +0 -24
- package/lib/hooks/useKeycloak/index.js +4 -4
- package/lib/hooks/useKeycloak/index.mjs +2 -2
- package/lib/hooks/useKeycloak/useKeycloak.d.mts +2 -0
- package/lib/hooks/useKeycloak/useKeycloak.js +4 -4
- package/lib/hooks/useKeycloak/useKeycloak.mjs +2 -2
- package/lib/hooks/useKeycloak/useKeycloak.native.d.mts +20 -0
- package/lib/hooks/useKeycloak/useKeycloak.native.d.ts +0 -24
- package/lib/hooks/useKeycloak/useKeycloak.native.js +8 -8
- package/lib/hooks/useKeycloak/useKeycloak.native.mjs +1 -1
- package/lib/hooks/useLogin.d.mts +3 -0
- package/lib/hooks/useLogin.d.ts +0 -23
- package/lib/hooks/useLogin.js +4 -4
- package/lib/hooks/useLogin.mjs +3 -3
- package/lib/hooks/useTokensFromQuery/index.d.mts +3 -0
- package/lib/hooks/useTokensFromQuery/index.d.ts +0 -23
- package/lib/hooks/useTokensFromQuery/index.js +1 -1
- package/lib/hooks/useTokensFromQuery/index.mjs +1 -1
- package/lib/hooks/useTokensFromQuery/index.native.d.mts +3 -0
- package/lib/hooks/useTokensFromQuery/index.native.d.ts +0 -23
- package/lib/hooks/useTokensFromQuery/index.native.js +1 -1
- package/lib/hooks/useTokensFromQuery/index.native.mjs +1 -1
- package/lib/hooks/useTokensFromState.d.mts +3 -0
- package/lib/hooks/useTokensFromState.d.ts +0 -23
- package/lib/hooks/useTokensFromState.js +1 -1
- package/lib/hooks/useTokensFromState.mjs +1 -1
- package/lib/index.d.mts +13 -0
- package/lib/index.js +15 -15
- package/lib/index.mjs +7 -7
- package/lib/provider/afterAuth.d.mts +29 -0
- package/lib/provider/afterAuth.d.ts +4 -7
- package/lib/provider/afterAuth.js +5 -5
- package/lib/provider/afterAuth.mjs +4 -4
- package/lib/provider/index.d.mts +39 -0
- package/lib/provider/index.d.ts +4 -7
- package/lib/provider/index.js +9 -9
- package/lib/provider/index.mjs +6 -6
- package/lib/provider/keycloakProvider.d.mts +42 -0
- package/lib/provider/keycloakProvider.d.ts +4 -7
- package/lib/provider/keycloakProvider.js +7 -7
- package/lib/provider/keycloakProvider.mjs +5 -5
- package/lib/provider/keycloakProvider.native.d.mts +29 -0
- package/lib/provider/keycloakProvider.native.d.ts +4 -7
- package/lib/provider/keycloakProvider.native.js +5 -5
- package/lib/provider/keycloakProvider.native.mjs +4 -4
- package/lib/state/index.d.mts +11 -0
- package/lib/state/index.d.ts +0 -23
- package/lib/state/index.js +1 -1
- package/lib/state/index.mjs +1 -1
- package/lib/types.d.mts +17 -0
- package/lib/types.d.ts +0 -23
- package/lib/types.js +1 -1
- package/lib/types.mjs +1 -1
- package/lib/util.d.mts +4 -0
- package/lib/util.d.ts +0 -23
- package/lib/util.js +1 -1
- package/lib/util.mjs +1 -1
- package/package.json +21 -37
- package/src/@types/coreJsPure.d.ts +16 -19
- package/src/@types/expoKeycloakAuth.d.ts +16 -19
- package/src/Authenticated.tsx +4 -7
- package/src/authConfig.ts +16 -19
- package/src/hooks/index.ts +16 -19
- package/src/hooks/useAuthConfig.ts +16 -19
- package/src/hooks/useCurrentRouteName/index.native.ts +16 -19
- package/src/hooks/useCurrentRouteName/index.ts +16 -19
- package/src/hooks/useKeycloak/index.ts +16 -19
- package/src/hooks/useKeycloak/useKeycloak.native.ts +16 -19
- package/src/hooks/useKeycloak/useKeycloak.ts +16 -19
- package/src/hooks/useLogin.ts +16 -19
- package/src/hooks/useTokensFromQuery/index.native.ts +16 -19
- package/src/hooks/useTokensFromQuery/index.ts +16 -19
- package/src/hooks/useTokensFromState.ts +16 -19
- package/src/index.ts +16 -19
- package/src/provider/afterAuth.tsx +4 -7
- package/src/provider/index.tsx +4 -7
- package/src/provider/keycloakProvider.native.tsx +4 -7
- package/src/provider/keycloakProvider.tsx +4 -7
- package/src/state/index.ts +16 -19
- package/src/types.ts +16 -19
- package/src/util.ts +16 -19
- package/README.md +0 -3
- /package/lib/{chunk-XXPGZHWZ.js → chunk-KMAXXKJT.js} +0 -0
- /package/lib/{chunk-NHABU752.mjs → chunk-S237YNYQ.mjs} +0 -0
package/lib/hooks/index.js
CHANGED
|
@@ -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
|
|
8
|
+
var _chunkHDNHCVXTjs = require("../chunk-HDNHCVXT.js");
|
|
9
9
|
var _chunkOYWAYMFNjs = require("../chunk-OYWAYMFN.js");
|
|
10
|
-
var
|
|
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-
|
|
17
|
-
exports.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 =
|
|
21
|
-
exports.useLogin =
|
|
20
|
+
exports.useKeycloak = _chunkE2X33LSDjs.useKeycloak;
|
|
21
|
+
exports.useLogin = _chunkHDNHCVXTjs.useLogin;
|
|
22
22
|
exports.useTokensFromQuery = _chunkKLLABHICjs.useTokensFromQuery;
|
|
23
23
|
exports.useTokensFromState = _chunkYGNNHTFEjs.useTokensFromState;
|
package/lib/hooks/index.mjs
CHANGED
|
@@ -5,14 +5,14 @@ import {
|
|
|
5
5
|
} from "../chunk-NXTVYIBR.mjs";
|
|
6
6
|
import {
|
|
7
7
|
useLogin
|
|
8
|
-
} from "../chunk-
|
|
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-
|
|
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-
|
|
25
|
+
import "../chunk-S237YNYQ.mjs";
|
|
26
26
|
export {
|
|
27
27
|
Keycloak,
|
|
28
28
|
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-
|
|
7
|
+
require("../chunk-KMAXXKJT.js");
|
|
8
8
|
exports.useAuthConfig = _chunk3ZPHNEJLjs.useAuthConfig;
|
|
@@ -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-
|
|
6
|
+
require("../../chunk-KMAXXKJT.js");
|
|
7
7
|
exports.useCurrentRouteName = _chunkOYWAYMFNjs.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-
|
|
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");
|
|
@@ -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
|
|
6
|
+
var _chunkE2X33LSDjs = require("../../chunk-E2X33LSD.js");
|
|
7
7
|
require("../../chunk-3ZPHNEJL.js");
|
|
8
8
|
require("../../chunk-A7UBOIAL.js");
|
|
9
|
-
require("../../chunk-
|
|
10
|
-
exports.Keycloak =
|
|
11
|
-
exports.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-
|
|
5
|
+
} from "../../chunk-NU2SJ3ST.mjs";
|
|
6
6
|
import "../../chunk-Y4XMF3R6.mjs";
|
|
7
7
|
import "../../chunk-64PPU7Q3.mjs";
|
|
8
|
-
import "../../chunk-
|
|
8
|
+
import "../../chunk-S237YNYQ.mjs";
|
|
9
9
|
export {
|
|
10
10
|
Keycloak,
|
|
11
11
|
useKeycloak
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
var
|
|
5
|
+
var _chunkE2X33LSDjs = require("../../chunk-E2X33LSD.js");
|
|
6
6
|
require("../../chunk-3ZPHNEJL.js");
|
|
7
7
|
require("../../chunk-A7UBOIAL.js");
|
|
8
|
-
require("../../chunk-
|
|
9
|
-
exports.Keycloak =
|
|
10
|
-
exports.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-
|
|
4
|
+
} from "../../chunk-NU2SJ3ST.mjs";
|
|
5
5
|
import "../../chunk-Y4XMF3R6.mjs";
|
|
6
6
|
import "../../chunk-64PPU7Q3.mjs";
|
|
7
|
-
import "../../chunk-
|
|
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
|
|
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
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
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);
|
package/lib/hooks/useLogin.d.ts
CHANGED
|
@@ -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 };
|
package/lib/hooks/useLogin.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
var
|
|
5
|
+
var _chunkHDNHCVXTjs = require("../chunk-HDNHCVXT.js");
|
|
6
6
|
require("../chunk-OYWAYMFN.js");
|
|
7
|
-
require("../chunk-
|
|
7
|
+
require("../chunk-E2X33LSD.js");
|
|
8
8
|
require("../chunk-3ZPHNEJL.js");
|
|
9
9
|
require("../chunk-A7UBOIAL.js");
|
|
10
|
-
require("../chunk-
|
|
11
|
-
exports.useLogin =
|
|
10
|
+
require("../chunk-KMAXXKJT.js");
|
|
11
|
+
exports.useLogin = _chunkHDNHCVXTjs.useLogin;
|
package/lib/hooks/useLogin.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useLogin
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-VLUTEDDM.mjs";
|
|
4
4
|
import "../chunk-L5HMOY4M.mjs";
|
|
5
|
-
import "../chunk-
|
|
5
|
+
import "../chunk-NU2SJ3ST.mjs";
|
|
6
6
|
import "../chunk-Y4XMF3R6.mjs";
|
|
7
7
|
import "../chunk-64PPU7Q3.mjs";
|
|
8
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-S237YNYQ.mjs";
|
|
9
9
|
export {
|
|
10
10
|
useLogin
|
|
11
11
|
};
|
|
@@ -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 };
|
|
@@ -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 };
|
|
@@ -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 };
|