@multiplatform.one/keycloak 0.7.1 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/@types/coreJsPure.d.d.ts +2 -0
- package/lib/@types/coreJsPure.d.js +1 -0
- package/lib/@types/coreJsPure.d.mjs +0 -0
- package/lib/@types/expoKeycloakAuth.d.d.ts +28 -0
- package/lib/@types/expoKeycloakAuth.d.js +1 -0
- package/lib/@types/expoKeycloakAuth.d.mjs +0 -0
- package/lib/Authenticated.d.ts +36 -0
- package/lib/Authenticated.js +19 -0
- package/lib/Authenticated.mjs +20 -0
- package/lib/authConfig.d.ts +37 -0
- package/lib/authConfig.js +8 -0
- package/lib/authConfig.mjs +9 -0
- package/lib/chunk-2GUOEPFY.mjs +0 -0
- package/lib/chunk-3ZPHNEJL.js +11 -0
- package/lib/chunk-64PPU7Q3.mjs +13 -0
- package/lib/chunk-6NDWOV55.js +1 -0
- package/lib/chunk-6QZDLO3M.mjs +41 -0
- package/lib/chunk-73FF4BX7.js +78 -0
- package/lib/chunk-7MTPH6XK.mjs +26 -0
- package/lib/chunk-A7UBOIAL.js +13 -0
- package/lib/chunk-AD6VPMID.mjs +20 -0
- package/lib/chunk-AYKQVWMR.mjs +0 -0
- package/lib/chunk-BTHRDOLL.mjs +84 -0
- package/lib/chunk-C2FNSVJO.js +17 -0
- package/lib/chunk-CLO6HIJN.mjs +52 -0
- package/lib/chunk-DJW5IKQS.mjs +265 -0
- package/lib/chunk-JLIMB5OD.js +56 -0
- package/lib/chunk-JYEIPNPN.mjs +76 -0
- package/lib/chunk-K2MQYDVB.mjs +50 -0
- package/lib/chunk-KLLABHIC.js +13 -0
- package/lib/chunk-L5HMOY4M.mjs +18 -0
- package/lib/chunk-NHABU752.mjs +10 -0
- package/lib/chunk-NRD376XV.js +33 -0
- package/lib/chunk-NWRANDZ6.js +98 -0
- package/lib/chunk-NXTVYIBR.mjs +11 -0
- package/lib/chunk-OYWAYMFN.js +17 -0
- package/lib/chunk-QFP2JWHZ.js +443 -0
- package/lib/chunk-RTZ3CZKS.js +161 -0
- package/lib/chunk-S3M2DZ6G.js +460 -0
- package/lib/chunk-UBVYEZI3.js +1 -0
- package/lib/chunk-UOKDJT5L.mjs +16 -0
- package/lib/chunk-XXPGZHWZ.js +22 -0
- package/lib/chunk-Y4XMF3R6.mjs +13 -0
- package/lib/chunk-YGNNHTFE.js +12 -0
- package/lib/hooks/index.d.ts +9 -0
- package/lib/hooks/index.js +23 -0
- package/lib/hooks/index.mjs +34 -0
- package/lib/hooks/useAuthConfig.d.ts +29 -0
- package/lib/hooks/useAuthConfig.js +8 -0
- package/lib/hooks/useAuthConfig.mjs +8 -0
- package/lib/hooks/useCurrentRouteName/index.d.ts +26 -0
- package/lib/hooks/useCurrentRouteName/index.js +7 -0
- package/lib/hooks/useCurrentRouteName/index.mjs +7 -0
- package/lib/hooks/useCurrentRouteName/index.native.d.ts +26 -0
- package/lib/hooks/useCurrentRouteName/index.native.js +14 -0
- package/lib/hooks/useCurrentRouteName/index.native.mjs +14 -0
- package/lib/hooks/useKeycloak/index.d.ts +70 -0
- package/lib/hooks/useKeycloak/index.js +11 -0
- package/lib/hooks/useKeycloak/index.mjs +12 -0
- package/lib/hooks/useKeycloak/useKeycloak.d.ts +2 -0
- package/lib/hooks/useKeycloak/useKeycloak.js +10 -0
- package/lib/hooks/useKeycloak/useKeycloak.mjs +11 -0
- package/lib/hooks/useKeycloak/useKeycloak.native.d.ts +44 -0
- package/lib/hooks/useKeycloak/useKeycloak.native.js +80 -0
- package/lib/hooks/useKeycloak/useKeycloak.native.mjs +69 -0
- package/lib/hooks/useLogin.d.ts +26 -0
- package/lib/hooks/useLogin.js +11 -0
- package/lib/hooks/useLogin.mjs +11 -0
- package/lib/hooks/useTokensFromQuery/index.d.ts +26 -0
- package/lib/hooks/useTokensFromQuery/index.js +7 -0
- package/lib/hooks/useTokensFromQuery/index.mjs +7 -0
- package/lib/hooks/useTokensFromQuery/index.native.d.ts +26 -0
- package/lib/hooks/useTokensFromQuery/index.native.js +10 -0
- package/lib/hooks/useTokensFromQuery/index.native.mjs +7 -0
- package/lib/hooks/useTokensFromState.d.ts +26 -0
- package/lib/hooks/useTokensFromState.js +9 -0
- package/lib/hooks/useTokensFromState.mjs +9 -0
- package/lib/index.d.ts +13 -0
- package/lib/index.mjs +56 -0
- package/lib/provider/afterAuth.d.ts +32 -0
- package/lib/provider/afterAuth.js +18 -0
- package/lib/provider/afterAuth.mjs +18 -0
- package/lib/provider/index.d.ts +42 -0
- package/lib/provider/index.js +22 -0
- package/lib/provider/index.mjs +25 -0
- package/lib/provider/keycloakProvider.d.ts +45 -0
- package/lib/provider/keycloakProvider.js +20 -0
- package/lib/provider/keycloakProvider.mjs +21 -0
- package/lib/provider/keycloakProvider.native.d.ts +32 -0
- package/lib/provider/keycloakProvider.native.js +87 -0
- package/lib/provider/keycloakProvider.native.mjs +30 -0
- package/lib/state/index.d.ts +34 -0
- package/lib/state/index.js +7 -0
- package/lib/state/index.mjs +7 -0
- package/lib/types.d.ts +40 -0
- package/lib/types.js +8 -0
- package/lib/types.mjs +7 -0
- package/lib/util.d.ts +27 -0
- package/lib/util.js +8 -0
- package/lib/util.mjs +9 -0
- package/package.json +6 -6
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ReactNode, FC } from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* File: /auth/provider/afterAuth.tsx
|
|
5
|
+
* Project: app
|
|
6
|
+
* File Created: 22-11-2022 17:49:58
|
|
7
|
+
* Author: Clay Risser
|
|
8
|
+
* -----
|
|
9
|
+
* Last Modified: 22-11-2022 18:00:39
|
|
10
|
+
* Modified By: Clay Risser
|
|
11
|
+
* -----
|
|
12
|
+
* Risser Labs LLC (c) Copyright 2021 - 2022
|
|
13
|
+
*
|
|
14
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
15
|
+
* you may not use this file except in compliance with the License.
|
|
16
|
+
* You may obtain a copy of the License at
|
|
17
|
+
*
|
|
18
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
19
|
+
*
|
|
20
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
21
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
22
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
23
|
+
* See the License for the specific language governing permissions and
|
|
24
|
+
* limitations under the License.
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
interface AfterAuthProps {
|
|
28
|
+
children: ReactNode;
|
|
29
|
+
}
|
|
30
|
+
declare const AfterAuth: FC<AfterAuthProps>;
|
|
31
|
+
|
|
32
|
+
export { AfterAuth, AfterAuthProps };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
var _chunkJLIMB5ODjs = require("../chunk-JLIMB5OD.js");
|
|
6
|
+
require("../chunk-UBVYEZI3.js");
|
|
7
|
+
require("../chunk-6NDWOV55.js");
|
|
8
|
+
require("../chunk-KLLABHIC.js");
|
|
9
|
+
require("../chunk-NRD376XV.js");
|
|
10
|
+
require("../chunk-OYWAYMFN.js");
|
|
11
|
+
require("../chunk-S3M2DZ6G.js");
|
|
12
|
+
require("../chunk-3ZPHNEJL.js");
|
|
13
|
+
require("../chunk-YGNNHTFE.js");
|
|
14
|
+
require("../chunk-C2FNSVJO.js");
|
|
15
|
+
require("../chunk-A7UBOIAL.js");
|
|
16
|
+
require("../chunk-NWRANDZ6.js");
|
|
17
|
+
require("../chunk-XXPGZHWZ.js");
|
|
18
|
+
exports.AfterAuth = _chunkJLIMB5ODjs.AfterAuth;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AfterAuth
|
|
3
|
+
} from "../chunk-K2MQYDVB.mjs";
|
|
4
|
+
import "../chunk-AYKQVWMR.mjs";
|
|
5
|
+
import "../chunk-2GUOEPFY.mjs";
|
|
6
|
+
import "../chunk-NXTVYIBR.mjs";
|
|
7
|
+
import "../chunk-6QZDLO3M.mjs";
|
|
8
|
+
import "../chunk-L5HMOY4M.mjs";
|
|
9
|
+
import "../chunk-BTHRDOLL.mjs";
|
|
10
|
+
import "../chunk-Y4XMF3R6.mjs";
|
|
11
|
+
import "../chunk-UOKDJT5L.mjs";
|
|
12
|
+
import "../chunk-AD6VPMID.mjs";
|
|
13
|
+
import "../chunk-64PPU7Q3.mjs";
|
|
14
|
+
import "../chunk-7MTPH6XK.mjs";
|
|
15
|
+
import "../chunk-NHABU752.mjs";
|
|
16
|
+
export {
|
|
17
|
+
AfterAuth
|
|
18
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { AuthClientEvent, AuthClientError, AuthClientTokens } from '@bitspur/react-keycloak-core';
|
|
2
|
+
import { AuthConfig } from '../authConfig.js';
|
|
3
|
+
import { ReactNode, ComponentType, FC } from 'react';
|
|
4
|
+
import { KeycloakConfig, KeycloakInitOptions } from '@bitspur/keycloak-js';
|
|
5
|
+
export { KeycloakProvider, KeycloakProviderProps, MessageSchema, defaultKeycloakInitOptions } from './keycloakProvider.js';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* File: /auth/provider/index.tsx
|
|
9
|
+
* Project: app
|
|
10
|
+
* File Created: 08-11-2022 06:33:07
|
|
11
|
+
* Author: Clay Risser
|
|
12
|
+
* -----
|
|
13
|
+
* Last Modified: 22-11-2022 18:00:13
|
|
14
|
+
* Modified By: Clay Risser
|
|
15
|
+
* -----
|
|
16
|
+
* Risser Labs LLC (c) Copyright 2021 - 2022
|
|
17
|
+
*
|
|
18
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
19
|
+
* you may not use this file except in compliance with the License.
|
|
20
|
+
* You may obtain a copy of the License at
|
|
21
|
+
*
|
|
22
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
23
|
+
*
|
|
24
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
25
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
26
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
27
|
+
* See the License for the specific language governing permissions and
|
|
28
|
+
* limitations under the License.
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
interface AuthProviderProps extends Partial<Omit<AuthConfig, 'persist'>>, Partial<Omit<KeycloakConfig, 'url'>>, KeycloakInitOptions {
|
|
32
|
+
children: ReactNode;
|
|
33
|
+
cookies?: unknown;
|
|
34
|
+
disabled?: boolean;
|
|
35
|
+
baseUrl?: string;
|
|
36
|
+
loadingComponent?: ComponentType;
|
|
37
|
+
onEvent?: (eventType: AuthClientEvent, error?: AuthClientError) => void;
|
|
38
|
+
onTokens?: (tokens: AuthClientTokens) => void;
|
|
39
|
+
}
|
|
40
|
+
declare const AuthProvider: FC<AuthProviderProps>;
|
|
41
|
+
|
|
42
|
+
export { AuthProvider, AuthProviderProps };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
var _chunkRTZ3CZKSjs = require("../chunk-RTZ3CZKS.js");
|
|
6
|
+
var _chunkQFP2JWHZjs = require("../chunk-QFP2JWHZ.js");
|
|
7
|
+
require("../chunk-JLIMB5OD.js");
|
|
8
|
+
require("../chunk-UBVYEZI3.js");
|
|
9
|
+
require("../chunk-6NDWOV55.js");
|
|
10
|
+
require("../chunk-KLLABHIC.js");
|
|
11
|
+
require("../chunk-NRD376XV.js");
|
|
12
|
+
require("../chunk-OYWAYMFN.js");
|
|
13
|
+
require("../chunk-S3M2DZ6G.js");
|
|
14
|
+
require("../chunk-3ZPHNEJL.js");
|
|
15
|
+
require("../chunk-YGNNHTFE.js");
|
|
16
|
+
require("../chunk-C2FNSVJO.js");
|
|
17
|
+
require("../chunk-A7UBOIAL.js");
|
|
18
|
+
require("../chunk-NWRANDZ6.js");
|
|
19
|
+
require("../chunk-XXPGZHWZ.js");
|
|
20
|
+
exports.AuthProvider = _chunkRTZ3CZKSjs.AuthProvider;
|
|
21
|
+
exports.KeycloakProvider = _chunkQFP2JWHZjs.KeycloakProvider;
|
|
22
|
+
exports.defaultKeycloakInitOptions = _chunkQFP2JWHZjs.defaultKeycloakInitOptions;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AuthProvider
|
|
3
|
+
} from "../chunk-JYEIPNPN.mjs";
|
|
4
|
+
import {
|
|
5
|
+
KeycloakProvider,
|
|
6
|
+
defaultKeycloakInitOptions
|
|
7
|
+
} from "../chunk-DJW5IKQS.mjs";
|
|
8
|
+
import "../chunk-K2MQYDVB.mjs";
|
|
9
|
+
import "../chunk-AYKQVWMR.mjs";
|
|
10
|
+
import "../chunk-2GUOEPFY.mjs";
|
|
11
|
+
import "../chunk-NXTVYIBR.mjs";
|
|
12
|
+
import "../chunk-6QZDLO3M.mjs";
|
|
13
|
+
import "../chunk-L5HMOY4M.mjs";
|
|
14
|
+
import "../chunk-BTHRDOLL.mjs";
|
|
15
|
+
import "../chunk-Y4XMF3R6.mjs";
|
|
16
|
+
import "../chunk-UOKDJT5L.mjs";
|
|
17
|
+
import "../chunk-AD6VPMID.mjs";
|
|
18
|
+
import "../chunk-64PPU7Q3.mjs";
|
|
19
|
+
import "../chunk-7MTPH6XK.mjs";
|
|
20
|
+
import "../chunk-NHABU752.mjs";
|
|
21
|
+
export {
|
|
22
|
+
AuthProvider,
|
|
23
|
+
KeycloakProvider,
|
|
24
|
+
defaultKeycloakInitOptions
|
|
25
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import React__default, { ReactNode, ComponentType } from 'react';
|
|
2
|
+
import { AuthClientEvent, AuthClientError, AuthClientTokens } from '@bitspur/react-keycloak-core';
|
|
3
|
+
import { KeycloakConfig, KeycloakInitOptions } from '@bitspur/keycloak-js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* File: /auth/provider/keycloakProvider.tsx
|
|
7
|
+
* Project: app
|
|
8
|
+
* File Created: 08-11-2022 03:12:43
|
|
9
|
+
* Author: Clay Risser
|
|
10
|
+
* -----
|
|
11
|
+
* Last Modified: 22-11-2022 18:07: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
|
+
interface KeycloakProviderProps {
|
|
30
|
+
children: ReactNode;
|
|
31
|
+
cookies?: unknown;
|
|
32
|
+
keycloakConfig: KeycloakConfig;
|
|
33
|
+
keycloakInitOptions?: KeycloakInitOptions;
|
|
34
|
+
loadingComponent?: ComponentType;
|
|
35
|
+
onEvent?: (eventType: AuthClientEvent, error?: AuthClientError) => void;
|
|
36
|
+
onTokens?: (tokens: AuthClientTokens) => void;
|
|
37
|
+
}
|
|
38
|
+
declare function KeycloakProvider({ children, cookies, keycloakConfig, keycloakInitOptions, loadingComponent, onEvent, onTokens, }: KeycloakProviderProps): React__default.JSX.Element;
|
|
39
|
+
declare const defaultKeycloakInitOptions: KeycloakInitOptions;
|
|
40
|
+
interface MessageSchema {
|
|
41
|
+
type: string;
|
|
42
|
+
payload?: string;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export { KeycloakProvider, KeycloakProviderProps, MessageSchema, defaultKeycloakInitOptions };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
var _chunkQFP2JWHZjs = require("../chunk-QFP2JWHZ.js");
|
|
6
|
+
require("../chunk-JLIMB5OD.js");
|
|
7
|
+
require("../chunk-UBVYEZI3.js");
|
|
8
|
+
require("../chunk-6NDWOV55.js");
|
|
9
|
+
require("../chunk-KLLABHIC.js");
|
|
10
|
+
require("../chunk-NRD376XV.js");
|
|
11
|
+
require("../chunk-OYWAYMFN.js");
|
|
12
|
+
require("../chunk-S3M2DZ6G.js");
|
|
13
|
+
require("../chunk-3ZPHNEJL.js");
|
|
14
|
+
require("../chunk-YGNNHTFE.js");
|
|
15
|
+
require("../chunk-C2FNSVJO.js");
|
|
16
|
+
require("../chunk-A7UBOIAL.js");
|
|
17
|
+
require("../chunk-NWRANDZ6.js");
|
|
18
|
+
require("../chunk-XXPGZHWZ.js");
|
|
19
|
+
exports.KeycloakProvider = _chunkQFP2JWHZjs.KeycloakProvider;
|
|
20
|
+
exports.defaultKeycloakInitOptions = _chunkQFP2JWHZjs.defaultKeycloakInitOptions;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import {
|
|
2
|
+
KeycloakProvider,
|
|
3
|
+
defaultKeycloakInitOptions
|
|
4
|
+
} from "../chunk-DJW5IKQS.mjs";
|
|
5
|
+
import "../chunk-K2MQYDVB.mjs";
|
|
6
|
+
import "../chunk-AYKQVWMR.mjs";
|
|
7
|
+
import "../chunk-2GUOEPFY.mjs";
|
|
8
|
+
import "../chunk-NXTVYIBR.mjs";
|
|
9
|
+
import "../chunk-6QZDLO3M.mjs";
|
|
10
|
+
import "../chunk-L5HMOY4M.mjs";
|
|
11
|
+
import "../chunk-BTHRDOLL.mjs";
|
|
12
|
+
import "../chunk-Y4XMF3R6.mjs";
|
|
13
|
+
import "../chunk-UOKDJT5L.mjs";
|
|
14
|
+
import "../chunk-AD6VPMID.mjs";
|
|
15
|
+
import "../chunk-64PPU7Q3.mjs";
|
|
16
|
+
import "../chunk-7MTPH6XK.mjs";
|
|
17
|
+
import "../chunk-NHABU752.mjs";
|
|
18
|
+
export {
|
|
19
|
+
KeycloakProvider,
|
|
20
|
+
defaultKeycloakInitOptions
|
|
21
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { KeycloakProviderProps } from './keycloakProvider.js';
|
|
3
|
+
import '@bitspur/react-keycloak-core';
|
|
4
|
+
import '@bitspur/keycloak-js';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* File: /auth/provider/keycloakProvider.native.tsx
|
|
8
|
+
* Project: app
|
|
9
|
+
* File Created: 08-11-2022 03:12:37
|
|
10
|
+
* Author: Clay Risser
|
|
11
|
+
* -----
|
|
12
|
+
* Last Modified: 22-11-2022 17:52:31
|
|
13
|
+
* Modified By: Clay Risser
|
|
14
|
+
* -----
|
|
15
|
+
* Risser Labs LLC (c) Copyright 2021 - 2022
|
|
16
|
+
*
|
|
17
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
18
|
+
* you may not use this file except in compliance with the License.
|
|
19
|
+
* You may obtain a copy of the License at
|
|
20
|
+
*
|
|
21
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
22
|
+
*
|
|
23
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
24
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
25
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
26
|
+
* See the License for the specific language governing permissions and
|
|
27
|
+
* limitations under the License.
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
declare const KeycloakProvider: FC<KeycloakProviderProps>;
|
|
31
|
+
|
|
32
|
+
export { KeycloakProvider };
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function _define_property(obj, key, value) {
|
|
3
|
+
if (key in obj) {
|
|
4
|
+
Object.defineProperty(obj, key, {
|
|
5
|
+
value: value,
|
|
6
|
+
enumerable: true,
|
|
7
|
+
configurable: true,
|
|
8
|
+
writable: true
|
|
9
|
+
});
|
|
10
|
+
} else {
|
|
11
|
+
obj[key] = value;
|
|
12
|
+
}
|
|
13
|
+
return obj;
|
|
14
|
+
}
|
|
15
|
+
function _object_spread(target) {
|
|
16
|
+
for(var i = 1; i < arguments.length; i++){
|
|
17
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
18
|
+
var ownKeys = Object.keys(source);
|
|
19
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
20
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
21
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
22
|
+
}));
|
|
23
|
+
}
|
|
24
|
+
ownKeys.forEach(function(key) {
|
|
25
|
+
_define_property(target, key, source[key]);
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
return target;
|
|
29
|
+
}
|
|
30
|
+
function ownKeys(object, enumerableOnly) {
|
|
31
|
+
var keys = Object.keys(object);
|
|
32
|
+
if (Object.getOwnPropertySymbols) {
|
|
33
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
34
|
+
if (enumerableOnly) {
|
|
35
|
+
symbols = symbols.filter(function(sym) {
|
|
36
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
keys.push.apply(keys, symbols);
|
|
40
|
+
}
|
|
41
|
+
return keys;
|
|
42
|
+
}
|
|
43
|
+
function _object_spread_props(target, source) {
|
|
44
|
+
source = source != null ? source : {};
|
|
45
|
+
if (Object.getOwnPropertyDescriptors) {
|
|
46
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
47
|
+
} else {
|
|
48
|
+
ownKeys(Object(source)).forEach(function(key) {
|
|
49
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
return target;
|
|
53
|
+
}
|
|
54
|
+
Object.defineProperty(exports, "__esModule", {
|
|
55
|
+
value: true
|
|
56
|
+
});
|
|
57
|
+
function _interopRequireDefault(obj) {
|
|
58
|
+
return obj && obj.__esModule ? obj : {
|
|
59
|
+
default: obj
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
var _chunkJLIMB5ODjs = require("../chunk-JLIMB5OD.js");
|
|
63
|
+
require("../chunk-UBVYEZI3.js");
|
|
64
|
+
require("../chunk-6NDWOV55.js");
|
|
65
|
+
require("../chunk-KLLABHIC.js");
|
|
66
|
+
require("../chunk-NRD376XV.js");
|
|
67
|
+
require("../chunk-OYWAYMFN.js");
|
|
68
|
+
require("../chunk-S3M2DZ6G.js");
|
|
69
|
+
require("../chunk-3ZPHNEJL.js");
|
|
70
|
+
require("../chunk-YGNNHTFE.js");
|
|
71
|
+
require("../chunk-C2FNSVJO.js");
|
|
72
|
+
require("../chunk-A7UBOIAL.js");
|
|
73
|
+
require("../chunk-NWRANDZ6.js");
|
|
74
|
+
require("../chunk-XXPGZHWZ.js");
|
|
75
|
+
// src/provider/keycloakProvider.native.tsx
|
|
76
|
+
var _react = require("react");
|
|
77
|
+
var _react2 = _interopRequireDefault(_react);
|
|
78
|
+
var _expokeycloakauth = require("expo-keycloak-auth");
|
|
79
|
+
var KeycloakProvider = function(param) {
|
|
80
|
+
var children = param.children, keycloakConfig = param.keycloakConfig;
|
|
81
|
+
var clonedKeycloakConfig = _object_spread_props(_object_spread({}, keycloakConfig), {
|
|
82
|
+
url: keycloakConfig.url
|
|
83
|
+
});
|
|
84
|
+
delete keycloakConfig.baseUrl;
|
|
85
|
+
return /* @__PURE__ */ _react2.default.createElement(_expokeycloakauth.KeycloakProvider, _object_spread({}, clonedKeycloakConfig), /* @__PURE__ */ _react2.default.createElement(_chunkJLIMB5ODjs.AfterAuth, null, children));
|
|
86
|
+
};
|
|
87
|
+
exports.KeycloakProvider = KeycloakProvider;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AfterAuth
|
|
3
|
+
} from "../chunk-K2MQYDVB.mjs";
|
|
4
|
+
import "../chunk-AYKQVWMR.mjs";
|
|
5
|
+
import "../chunk-2GUOEPFY.mjs";
|
|
6
|
+
import "../chunk-NXTVYIBR.mjs";
|
|
7
|
+
import "../chunk-6QZDLO3M.mjs";
|
|
8
|
+
import "../chunk-L5HMOY4M.mjs";
|
|
9
|
+
import "../chunk-BTHRDOLL.mjs";
|
|
10
|
+
import "../chunk-Y4XMF3R6.mjs";
|
|
11
|
+
import "../chunk-UOKDJT5L.mjs";
|
|
12
|
+
import "../chunk-AD6VPMID.mjs";
|
|
13
|
+
import "../chunk-64PPU7Q3.mjs";
|
|
14
|
+
import "../chunk-7MTPH6XK.mjs";
|
|
15
|
+
import "../chunk-NHABU752.mjs";
|
|
16
|
+
|
|
17
|
+
// src/provider/keycloakProvider.native.tsx
|
|
18
|
+
import React from "react";
|
|
19
|
+
import { KeycloakProvider as ExpoKeycloakProvider } from "expo-keycloak-auth";
|
|
20
|
+
var KeycloakProvider = ({ children, keycloakConfig }) => {
|
|
21
|
+
const clonedKeycloakConfig = {
|
|
22
|
+
...keycloakConfig,
|
|
23
|
+
url: keycloakConfig.url
|
|
24
|
+
};
|
|
25
|
+
delete keycloakConfig.baseUrl;
|
|
26
|
+
return /* @__PURE__ */ React.createElement(ExpoKeycloakProvider, { ...clonedKeycloakConfig }, /* @__PURE__ */ React.createElement(AfterAuth, null, children));
|
|
27
|
+
};
|
|
28
|
+
export {
|
|
29
|
+
KeycloakProvider
|
|
30
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* File: /src/state/index.ts
|
|
3
|
+
* Project: app
|
|
4
|
+
* File Created: 22-11-2022 17:40:53
|
|
5
|
+
* Author: Clay Risser
|
|
6
|
+
* -----
|
|
7
|
+
* Last Modified: 26-05-2023 07:31:04
|
|
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
|
+
declare function useAuthState(): {
|
|
25
|
+
idToken: string;
|
|
26
|
+
refreshToken: string;
|
|
27
|
+
token: string;
|
|
28
|
+
} & {
|
|
29
|
+
setIdToken: (value: string) => void;
|
|
30
|
+
setRefreshToken: (value: string) => void;
|
|
31
|
+
setToken: (value: string) => void;
|
|
32
|
+
} & Record<string, Function>;
|
|
33
|
+
|
|
34
|
+
export { useAuthState };
|
package/lib/types.d.ts
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* File: /src/types.ts
|
|
3
|
+
* Project: @multiplatform.one/keycloak
|
|
4
|
+
* File Created: 25-11-2022 10:27:53
|
|
5
|
+
* Author: Clay Risser
|
|
6
|
+
* -----
|
|
7
|
+
* Last Modified: 25-11-2022 10:28:25
|
|
8
|
+
* Modified By: Clay Risser
|
|
9
|
+
* -----
|
|
10
|
+
* Risser Labs LLC (c) Copyright 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
|
+
declare global {
|
|
25
|
+
interface Window {
|
|
26
|
+
ReactNativeWebView: {
|
|
27
|
+
postMessage: (body: string) => unknown;
|
|
28
|
+
};
|
|
29
|
+
webkit: {
|
|
30
|
+
messageHandlers: {
|
|
31
|
+
[key: string]: {
|
|
32
|
+
postMessage: (body: string) => unknown;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
declare const _default: null;
|
|
39
|
+
|
|
40
|
+
export { _default as default };
|
package/lib/types.js
ADDED
package/lib/types.mjs
ADDED
package/lib/util.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* File: /src/util.ts
|
|
3
|
+
* Project: @multiplatform.one/keycloak
|
|
4
|
+
* File Created: 16-05-2023 06:29:32
|
|
5
|
+
* Author: Clay Risser
|
|
6
|
+
* -----
|
|
7
|
+
* Last Modified: 16-05-2023 06:33: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
|
+
declare function validToken(token: string | boolean, refreshToken?: string | boolean): string | boolean;
|
|
25
|
+
declare function isTokenValid(token: string): boolean;
|
|
26
|
+
|
|
27
|
+
export { isTokenValid, validToken };
|
package/lib/util.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
var _chunkNWRANDZ6js = require("./chunk-NWRANDZ6.js");
|
|
6
|
+
require("./chunk-XXPGZHWZ.js");
|
|
7
|
+
exports.isTokenValid = _chunkNWRANDZ6js.isTokenValid;
|
|
8
|
+
exports.validToken = _chunkNWRANDZ6js.validToken;
|
package/lib/util.mjs
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@multiplatform.one/keycloak",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.2",
|
|
4
4
|
"description": "keycloak client for multiplatform.one ecosystem",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/index.mjs",
|
|
@@ -27,6 +27,8 @@
|
|
|
27
27
|
"license": "Apache-2.0",
|
|
28
28
|
"files": [
|
|
29
29
|
"dist",
|
|
30
|
+
"index.d.ts",
|
|
31
|
+
"lib",
|
|
30
32
|
"src"
|
|
31
33
|
],
|
|
32
34
|
"repository": {
|
|
@@ -37,7 +39,7 @@
|
|
|
37
39
|
"@react-native-async-storage/async-storage": "^1.17.11",
|
|
38
40
|
"@react-navigation/native": "^6.0.14",
|
|
39
41
|
"expo-keycloak-auth": "1.0.14",
|
|
40
|
-
"multiplatform.one": "^0.7.
|
|
42
|
+
"multiplatform.one": "^0.7.2",
|
|
41
43
|
"next": "^13.0.5",
|
|
42
44
|
"react": "^18.2.0",
|
|
43
45
|
"react-native": "~0.68.5"
|
|
@@ -69,7 +71,7 @@
|
|
|
69
71
|
"jest": "^29.5.0",
|
|
70
72
|
"jest-sonar-reporter": "^2.0.0",
|
|
71
73
|
"lockfile-lint": "^4.10.5",
|
|
72
|
-
"multiplatform.one": "^0.7.
|
|
74
|
+
"multiplatform.one": "^0.7.2",
|
|
73
75
|
"next": "^13.4.7",
|
|
74
76
|
"prettier": "^2.8.8",
|
|
75
77
|
"react": "^18.2.0",
|
|
@@ -82,9 +84,7 @@
|
|
|
82
84
|
},
|
|
83
85
|
"eslintIgnore": [
|
|
84
86
|
"dist",
|
|
85
|
-
"
|
|
86
|
-
"lib",
|
|
87
|
-
"src"
|
|
87
|
+
"lib"
|
|
88
88
|
],
|
|
89
89
|
"jest": {
|
|
90
90
|
"testRegex": "((/(tests|__tests__)((/|/[^_.\n][^/\n]*(/[^_.\n][^/\n]+)*/)[^_.\n][^/\n]*))|((/|/.*/)(([^_.\n][^/\n]*.(spec|test))|(spec|test)))).[jt]sx?$",
|