@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
|
@@ -5,5 +5,5 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
var _chunkYGNNHTFEjs = require("../chunk-YGNNHTFE.js");
|
|
6
6
|
require("../chunk-C2FNSVJO.js");
|
|
7
7
|
require("../chunk-NWRANDZ6.js");
|
|
8
|
-
require("../chunk-
|
|
8
|
+
require("../chunk-KMAXXKJT.js");
|
|
9
9
|
exports.useTokensFromState = _chunkYGNNHTFEjs.useTokensFromState;
|
package/lib/index.d.mts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { Authenticated, AuthenticatedProps, withAuthenticated } from './Authenticated.mjs';
|
|
2
|
+
export { AuthConfig, AuthConfigContext, defaultAuthConfig } from './authConfig.mjs';
|
|
3
|
+
export { useAuthConfig } from './hooks/useAuthConfig.mjs';
|
|
4
|
+
export { useCurrentRouteName } from './hooks/useCurrentRouteName/index.mjs';
|
|
5
|
+
export { IKeycloak, ITokenParsed, Keycloak, useKeycloak } from './hooks/useKeycloak/index.mjs';
|
|
6
|
+
export { useLogin } from './hooks/useLogin.mjs';
|
|
7
|
+
export { useTokensFromQuery } from './hooks/useTokensFromQuery/index.mjs';
|
|
8
|
+
export { useTokensFromState } from './hooks/useTokensFromState.mjs';
|
|
9
|
+
export { AuthProvider, AuthProviderProps } from './provider/index.mjs';
|
|
10
|
+
export { KeycloakProvider, KeycloakProviderProps, MessageSchema, defaultKeycloakInitOptions } from './provider/keycloakProvider.mjs';
|
|
11
|
+
import 'react';
|
|
12
|
+
import '@bitspur/keycloak-js';
|
|
13
|
+
import '@bitspur/react-keycloak-core';
|
package/lib/index.js
CHANGED
|
@@ -2,33 +2,33 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
require("./chunk-
|
|
8
|
-
var
|
|
5
|
+
var _chunkFXGWERIAjs = require("./chunk-FXGWERIA.js");
|
|
6
|
+
var _chunkBTCP7NB3js = require("./chunk-BTCP7NB3.js");
|
|
7
|
+
require("./chunk-UBCNCE73.js");
|
|
8
|
+
var _chunkBJ2OPIMWjs = require("./chunk-BJ2OPIMW.js");
|
|
9
9
|
require("./chunk-UBVYEZI3.js");
|
|
10
10
|
require("./chunk-6NDWOV55.js");
|
|
11
11
|
var _chunkKLLABHICjs = require("./chunk-KLLABHIC.js");
|
|
12
|
-
var
|
|
12
|
+
var _chunkHDNHCVXTjs = require("./chunk-HDNHCVXT.js");
|
|
13
13
|
var _chunkOYWAYMFNjs = require("./chunk-OYWAYMFN.js");
|
|
14
|
-
var
|
|
14
|
+
var _chunkE2X33LSDjs = require("./chunk-E2X33LSD.js");
|
|
15
15
|
var _chunk3ZPHNEJLjs = require("./chunk-3ZPHNEJL.js");
|
|
16
16
|
var _chunkYGNNHTFEjs = require("./chunk-YGNNHTFE.js");
|
|
17
17
|
require("./chunk-C2FNSVJO.js");
|
|
18
18
|
var _chunkA7UBOIALjs = require("./chunk-A7UBOIAL.js");
|
|
19
19
|
require("./chunk-NWRANDZ6.js");
|
|
20
|
-
require("./chunk-
|
|
20
|
+
require("./chunk-KMAXXKJT.js");
|
|
21
21
|
exports.AuthConfigContext = _chunkA7UBOIALjs.AuthConfigContext;
|
|
22
|
-
exports.AuthProvider =
|
|
23
|
-
exports.Authenticated =
|
|
24
|
-
exports.Keycloak =
|
|
25
|
-
exports.KeycloakProvider =
|
|
22
|
+
exports.AuthProvider = _chunkFXGWERIAjs.AuthProvider;
|
|
23
|
+
exports.Authenticated = _chunkBJ2OPIMWjs.Authenticated;
|
|
24
|
+
exports.Keycloak = _chunkE2X33LSDjs.Keycloak;
|
|
25
|
+
exports.KeycloakProvider = _chunkBTCP7NB3js.KeycloakProvider;
|
|
26
26
|
exports.defaultAuthConfig = _chunkA7UBOIALjs.defaultAuthConfig;
|
|
27
|
-
exports.defaultKeycloakInitOptions =
|
|
27
|
+
exports.defaultKeycloakInitOptions = _chunkBTCP7NB3js.defaultKeycloakInitOptions;
|
|
28
28
|
exports.useAuthConfig = _chunk3ZPHNEJLjs.useAuthConfig;
|
|
29
29
|
exports.useCurrentRouteName = _chunkOYWAYMFNjs.useCurrentRouteName;
|
|
30
|
-
exports.useKeycloak =
|
|
31
|
-
exports.useLogin =
|
|
30
|
+
exports.useKeycloak = _chunkE2X33LSDjs.useKeycloak;
|
|
31
|
+
exports.useLogin = _chunkHDNHCVXTjs.useLogin;
|
|
32
32
|
exports.useTokensFromQuery = _chunkKLLABHICjs.useTokensFromQuery;
|
|
33
33
|
exports.useTokensFromState = _chunkYGNNHTFEjs.useTokensFromState;
|
|
34
|
-
exports.withAuthenticated =
|
|
34
|
+
exports.withAuthenticated = _chunkBJ2OPIMWjs.withAuthenticated;
|
package/lib/index.mjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AuthProvider
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-AOKVCTMY.mjs";
|
|
4
4
|
import {
|
|
5
5
|
KeycloakProvider,
|
|
6
6
|
defaultKeycloakInitOptions
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-DKRUDENY.mjs";
|
|
8
|
+
import "./chunk-SK4YK6KE.mjs";
|
|
9
9
|
import {
|
|
10
10
|
Authenticated,
|
|
11
11
|
withAuthenticated
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-ZVG3OFME.mjs";
|
|
13
13
|
import "./chunk-AYKQVWMR.mjs";
|
|
14
14
|
import "./chunk-2GUOEPFY.mjs";
|
|
15
15
|
import {
|
|
@@ -17,14 +17,14 @@ import {
|
|
|
17
17
|
} from "./chunk-NXTVYIBR.mjs";
|
|
18
18
|
import {
|
|
19
19
|
useLogin
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-VLUTEDDM.mjs";
|
|
21
21
|
import {
|
|
22
22
|
useCurrentRouteName
|
|
23
23
|
} from "./chunk-L5HMOY4M.mjs";
|
|
24
24
|
import {
|
|
25
25
|
Keycloak,
|
|
26
26
|
useKeycloak
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-NU2SJ3ST.mjs";
|
|
28
28
|
import {
|
|
29
29
|
useAuthConfig
|
|
30
30
|
} from "./chunk-Y4XMF3R6.mjs";
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
defaultAuthConfig
|
|
38
38
|
} from "./chunk-64PPU7Q3.mjs";
|
|
39
39
|
import "./chunk-7MTPH6XK.mjs";
|
|
40
|
-
import "./chunk-
|
|
40
|
+
import "./chunk-S237YNYQ.mjs";
|
|
41
41
|
export {
|
|
42
42
|
AuthConfigContext,
|
|
43
43
|
AuthProvider,
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ReactNode, FC } from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* File: /src/provider/afterAuth.tsx
|
|
5
|
+
* Project: @multiplatform.one/keycloak
|
|
6
|
+
* File Created: 22-06-2023 10:07:56
|
|
7
|
+
* Author: Clay Risser
|
|
8
|
+
* -----
|
|
9
|
+
* BitSpur (c) Copyright 2021 - 2023
|
|
10
|
+
*
|
|
11
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
12
|
+
* you may not use this file except in compliance with the License.
|
|
13
|
+
* You may obtain a copy of the License at
|
|
14
|
+
*
|
|
15
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
16
|
+
*
|
|
17
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
18
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
19
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
20
|
+
* See the License for the specific language governing permissions and
|
|
21
|
+
* limitations under the License.
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
interface AfterAuthProps {
|
|
25
|
+
children: ReactNode;
|
|
26
|
+
}
|
|
27
|
+
declare const AfterAuth: FC<AfterAuthProps>;
|
|
28
|
+
|
|
29
|
+
export { AfterAuth, AfterAuthProps };
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import { ReactNode, FC } from 'react';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* File: /
|
|
5
|
-
* Project:
|
|
6
|
-
* File Created: 22-
|
|
4
|
+
* File: /src/provider/afterAuth.tsx
|
|
5
|
+
* Project: @multiplatform.one/keycloak
|
|
6
|
+
* File Created: 22-06-2023 10:07:56
|
|
7
7
|
* Author: Clay Risser
|
|
8
8
|
* -----
|
|
9
|
-
*
|
|
10
|
-
* Modified By: Clay Risser
|
|
11
|
-
* -----
|
|
12
|
-
* Risser Labs LLC (c) Copyright 2021 - 2022
|
|
9
|
+
* BitSpur (c) Copyright 2021 - 2023
|
|
13
10
|
*
|
|
14
11
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
15
12
|
* you may not use this file except in compliance with the License.
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
var
|
|
5
|
+
var _chunkUBCNCE73js = require("../chunk-UBCNCE73.js");
|
|
6
6
|
require("../chunk-UBVYEZI3.js");
|
|
7
7
|
require("../chunk-6NDWOV55.js");
|
|
8
8
|
require("../chunk-KLLABHIC.js");
|
|
9
|
-
require("../chunk-
|
|
9
|
+
require("../chunk-HDNHCVXT.js");
|
|
10
10
|
require("../chunk-OYWAYMFN.js");
|
|
11
|
-
require("../chunk-
|
|
11
|
+
require("../chunk-E2X33LSD.js");
|
|
12
12
|
require("../chunk-3ZPHNEJL.js");
|
|
13
13
|
require("../chunk-YGNNHTFE.js");
|
|
14
14
|
require("../chunk-C2FNSVJO.js");
|
|
15
15
|
require("../chunk-A7UBOIAL.js");
|
|
16
16
|
require("../chunk-NWRANDZ6.js");
|
|
17
|
-
require("../chunk-
|
|
18
|
-
exports.AfterAuth =
|
|
17
|
+
require("../chunk-KMAXXKJT.js");
|
|
18
|
+
exports.AfterAuth = _chunkUBCNCE73js.AfterAuth;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AfterAuth
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-SK4YK6KE.mjs";
|
|
4
4
|
import "../chunk-AYKQVWMR.mjs";
|
|
5
5
|
import "../chunk-2GUOEPFY.mjs";
|
|
6
6
|
import "../chunk-NXTVYIBR.mjs";
|
|
7
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-VLUTEDDM.mjs";
|
|
8
8
|
import "../chunk-L5HMOY4M.mjs";
|
|
9
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-NU2SJ3ST.mjs";
|
|
10
10
|
import "../chunk-Y4XMF3R6.mjs";
|
|
11
11
|
import "../chunk-UOKDJT5L.mjs";
|
|
12
12
|
import "../chunk-AD6VPMID.mjs";
|
|
13
13
|
import "../chunk-64PPU7Q3.mjs";
|
|
14
14
|
import "../chunk-7MTPH6XK.mjs";
|
|
15
|
-
import "../chunk-
|
|
15
|
+
import "../chunk-S237YNYQ.mjs";
|
|
16
16
|
export {
|
|
17
17
|
AfterAuth
|
|
18
18
|
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { AuthClientEvent, AuthClientError, AuthClientTokens } from '@bitspur/react-keycloak-core';
|
|
2
|
+
import { AuthConfig } from '../authConfig.mjs';
|
|
3
|
+
import { ReactNode, ComponentType, FC } from 'react';
|
|
4
|
+
import { KeycloakConfig, KeycloakInitOptions } from '@bitspur/keycloak-js';
|
|
5
|
+
export { KeycloakProvider, KeycloakProviderProps, MessageSchema, defaultKeycloakInitOptions } from './keycloakProvider.mjs';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* File: /src/provider/index.tsx
|
|
9
|
+
* Project: @multiplatform.one/keycloak
|
|
10
|
+
* File Created: 22-06-2023 10:07:56
|
|
11
|
+
* Author: Clay Risser
|
|
12
|
+
* -----
|
|
13
|
+
* BitSpur (c) Copyright 2021 - 2023
|
|
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
|
+
|
|
28
|
+
interface AuthProviderProps extends Partial<Omit<AuthConfig, 'persist'>>, Partial<Omit<KeycloakConfig, 'url'>>, KeycloakInitOptions {
|
|
29
|
+
children: ReactNode;
|
|
30
|
+
cookies?: unknown;
|
|
31
|
+
disabled?: boolean;
|
|
32
|
+
baseUrl?: string;
|
|
33
|
+
loadingComponent?: ComponentType;
|
|
34
|
+
onEvent?: (eventType: AuthClientEvent, error?: AuthClientError) => void;
|
|
35
|
+
onTokens?: (tokens: AuthClientTokens) => void;
|
|
36
|
+
}
|
|
37
|
+
declare const AuthProvider: FC<AuthProviderProps>;
|
|
38
|
+
|
|
39
|
+
export { AuthProvider, AuthProviderProps };
|
package/lib/provider/index.d.ts
CHANGED
|
@@ -5,15 +5,12 @@ import { KeycloakConfig, KeycloakInitOptions } from '@bitspur/keycloak-js';
|
|
|
5
5
|
export { KeycloakProvider, KeycloakProviderProps, MessageSchema, defaultKeycloakInitOptions } from './keycloakProvider.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
* File: /
|
|
9
|
-
* Project:
|
|
10
|
-
* File Created:
|
|
8
|
+
* File: /src/provider/index.tsx
|
|
9
|
+
* Project: @multiplatform.one/keycloak
|
|
10
|
+
* File Created: 22-06-2023 10:07:56
|
|
11
11
|
* Author: Clay Risser
|
|
12
12
|
* -----
|
|
13
|
-
*
|
|
14
|
-
* Modified By: Clay Risser
|
|
15
|
-
* -----
|
|
16
|
-
* Risser Labs LLC (c) Copyright 2021 - 2022
|
|
13
|
+
* BitSpur (c) Copyright 2021 - 2023
|
|
17
14
|
*
|
|
18
15
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
19
16
|
* you may not use this file except in compliance with the License.
|
package/lib/provider/index.js
CHANGED
|
@@ -2,21 +2,21 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
require("../chunk-
|
|
5
|
+
var _chunkFXGWERIAjs = require("../chunk-FXGWERIA.js");
|
|
6
|
+
var _chunkBTCP7NB3js = require("../chunk-BTCP7NB3.js");
|
|
7
|
+
require("../chunk-UBCNCE73.js");
|
|
8
8
|
require("../chunk-UBVYEZI3.js");
|
|
9
9
|
require("../chunk-6NDWOV55.js");
|
|
10
10
|
require("../chunk-KLLABHIC.js");
|
|
11
|
-
require("../chunk-
|
|
11
|
+
require("../chunk-HDNHCVXT.js");
|
|
12
12
|
require("../chunk-OYWAYMFN.js");
|
|
13
|
-
require("../chunk-
|
|
13
|
+
require("../chunk-E2X33LSD.js");
|
|
14
14
|
require("../chunk-3ZPHNEJL.js");
|
|
15
15
|
require("../chunk-YGNNHTFE.js");
|
|
16
16
|
require("../chunk-C2FNSVJO.js");
|
|
17
17
|
require("../chunk-A7UBOIAL.js");
|
|
18
18
|
require("../chunk-NWRANDZ6.js");
|
|
19
|
-
require("../chunk-
|
|
20
|
-
exports.AuthProvider =
|
|
21
|
-
exports.KeycloakProvider =
|
|
22
|
-
exports.defaultKeycloakInitOptions =
|
|
19
|
+
require("../chunk-KMAXXKJT.js");
|
|
20
|
+
exports.AuthProvider = _chunkFXGWERIAjs.AuthProvider;
|
|
21
|
+
exports.KeycloakProvider = _chunkBTCP7NB3js.KeycloakProvider;
|
|
22
|
+
exports.defaultKeycloakInitOptions = _chunkBTCP7NB3js.defaultKeycloakInitOptions;
|
package/lib/provider/index.mjs
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AuthProvider
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-AOKVCTMY.mjs";
|
|
4
4
|
import {
|
|
5
5
|
KeycloakProvider,
|
|
6
6
|
defaultKeycloakInitOptions
|
|
7
|
-
} from "../chunk-
|
|
8
|
-
import "../chunk-
|
|
7
|
+
} from "../chunk-DKRUDENY.mjs";
|
|
8
|
+
import "../chunk-SK4YK6KE.mjs";
|
|
9
9
|
import "../chunk-AYKQVWMR.mjs";
|
|
10
10
|
import "../chunk-2GUOEPFY.mjs";
|
|
11
11
|
import "../chunk-NXTVYIBR.mjs";
|
|
12
|
-
import "../chunk-
|
|
12
|
+
import "../chunk-VLUTEDDM.mjs";
|
|
13
13
|
import "../chunk-L5HMOY4M.mjs";
|
|
14
|
-
import "../chunk-
|
|
14
|
+
import "../chunk-NU2SJ3ST.mjs";
|
|
15
15
|
import "../chunk-Y4XMF3R6.mjs";
|
|
16
16
|
import "../chunk-UOKDJT5L.mjs";
|
|
17
17
|
import "../chunk-AD6VPMID.mjs";
|
|
18
18
|
import "../chunk-64PPU7Q3.mjs";
|
|
19
19
|
import "../chunk-7MTPH6XK.mjs";
|
|
20
|
-
import "../chunk-
|
|
20
|
+
import "../chunk-S237YNYQ.mjs";
|
|
21
21
|
export {
|
|
22
22
|
AuthProvider,
|
|
23
23
|
KeycloakProvider,
|
|
@@ -0,0 +1,42 @@
|
|
|
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: /src/provider/keycloakProvider.tsx
|
|
7
|
+
* Project: @multiplatform.one/keycloak
|
|
8
|
+
* File Created: 22-06-2023 10:07:56
|
|
9
|
+
* Author: Clay Risser
|
|
10
|
+
* -----
|
|
11
|
+
* BitSpur (c) Copyright 2021 - 2023
|
|
12
|
+
*
|
|
13
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
14
|
+
* you may not use this file except in compliance with the License.
|
|
15
|
+
* You may obtain a copy of the License at
|
|
16
|
+
*
|
|
17
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
18
|
+
*
|
|
19
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
20
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
21
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
22
|
+
* See the License for the specific language governing permissions and
|
|
23
|
+
* limitations under the License.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
interface KeycloakProviderProps {
|
|
27
|
+
children: ReactNode;
|
|
28
|
+
cookies?: unknown;
|
|
29
|
+
keycloakConfig: KeycloakConfig;
|
|
30
|
+
keycloakInitOptions?: KeycloakInitOptions;
|
|
31
|
+
loadingComponent?: ComponentType;
|
|
32
|
+
onEvent?: (eventType: AuthClientEvent, error?: AuthClientError) => void;
|
|
33
|
+
onTokens?: (tokens: AuthClientTokens) => void;
|
|
34
|
+
}
|
|
35
|
+
declare function KeycloakProvider({ children, cookies, keycloakConfig, keycloakInitOptions, loadingComponent, onEvent, onTokens, }: KeycloakProviderProps): React__default.JSX.Element;
|
|
36
|
+
declare const defaultKeycloakInitOptions: KeycloakInitOptions;
|
|
37
|
+
interface MessageSchema {
|
|
38
|
+
type: string;
|
|
39
|
+
payload?: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export { KeycloakProvider, KeycloakProviderProps, MessageSchema, defaultKeycloakInitOptions };
|
|
@@ -3,15 +3,12 @@ import { AuthClientEvent, AuthClientError, AuthClientTokens } from '@bitspur/rea
|
|
|
3
3
|
import { KeycloakConfig, KeycloakInitOptions } from '@bitspur/keycloak-js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
* File: /
|
|
7
|
-
* Project:
|
|
8
|
-
* File Created:
|
|
6
|
+
* File: /src/provider/keycloakProvider.tsx
|
|
7
|
+
* Project: @multiplatform.one/keycloak
|
|
8
|
+
* File Created: 22-06-2023 10:07:56
|
|
9
9
|
* Author: Clay Risser
|
|
10
10
|
* -----
|
|
11
|
-
*
|
|
12
|
-
* Modified By: Clay Risser
|
|
13
|
-
* -----
|
|
14
|
-
* Risser Labs LLC (c) Copyright 2021 - 2022
|
|
11
|
+
* BitSpur (c) Copyright 2021 - 2023
|
|
15
12
|
*
|
|
16
13
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
17
14
|
* you may not use this file except in compliance with the License.
|
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
var
|
|
6
|
-
require("../chunk-
|
|
5
|
+
var _chunkBTCP7NB3js = require("../chunk-BTCP7NB3.js");
|
|
6
|
+
require("../chunk-UBCNCE73.js");
|
|
7
7
|
require("../chunk-UBVYEZI3.js");
|
|
8
8
|
require("../chunk-6NDWOV55.js");
|
|
9
9
|
require("../chunk-KLLABHIC.js");
|
|
10
|
-
require("../chunk-
|
|
10
|
+
require("../chunk-HDNHCVXT.js");
|
|
11
11
|
require("../chunk-OYWAYMFN.js");
|
|
12
|
-
require("../chunk-
|
|
12
|
+
require("../chunk-E2X33LSD.js");
|
|
13
13
|
require("../chunk-3ZPHNEJL.js");
|
|
14
14
|
require("../chunk-YGNNHTFE.js");
|
|
15
15
|
require("../chunk-C2FNSVJO.js");
|
|
16
16
|
require("../chunk-A7UBOIAL.js");
|
|
17
17
|
require("../chunk-NWRANDZ6.js");
|
|
18
|
-
require("../chunk-
|
|
19
|
-
exports.KeycloakProvider =
|
|
20
|
-
exports.defaultKeycloakInitOptions =
|
|
18
|
+
require("../chunk-KMAXXKJT.js");
|
|
19
|
+
exports.KeycloakProvider = _chunkBTCP7NB3js.KeycloakProvider;
|
|
20
|
+
exports.defaultKeycloakInitOptions = _chunkBTCP7NB3js.defaultKeycloakInitOptions;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
KeycloakProvider,
|
|
3
3
|
defaultKeycloakInitOptions
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-DKRUDENY.mjs";
|
|
5
|
+
import "../chunk-SK4YK6KE.mjs";
|
|
6
6
|
import "../chunk-AYKQVWMR.mjs";
|
|
7
7
|
import "../chunk-2GUOEPFY.mjs";
|
|
8
8
|
import "../chunk-NXTVYIBR.mjs";
|
|
9
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-VLUTEDDM.mjs";
|
|
10
10
|
import "../chunk-L5HMOY4M.mjs";
|
|
11
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-NU2SJ3ST.mjs";
|
|
12
12
|
import "../chunk-Y4XMF3R6.mjs";
|
|
13
13
|
import "../chunk-UOKDJT5L.mjs";
|
|
14
14
|
import "../chunk-AD6VPMID.mjs";
|
|
15
15
|
import "../chunk-64PPU7Q3.mjs";
|
|
16
16
|
import "../chunk-7MTPH6XK.mjs";
|
|
17
|
-
import "../chunk-
|
|
17
|
+
import "../chunk-S237YNYQ.mjs";
|
|
18
18
|
export {
|
|
19
19
|
KeycloakProvider,
|
|
20
20
|
defaultKeycloakInitOptions
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { KeycloakProviderProps } from './keycloakProvider.mjs';
|
|
3
|
+
import '@bitspur/react-keycloak-core';
|
|
4
|
+
import '@bitspur/keycloak-js';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* File: /src/provider/keycloakProvider.native.tsx
|
|
8
|
+
* Project: @multiplatform.one/keycloak
|
|
9
|
+
* File Created: 22-06-2023 10:07:56
|
|
10
|
+
* Author: Clay Risser
|
|
11
|
+
* -----
|
|
12
|
+
* BitSpur (c) Copyright 2021 - 2023
|
|
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
|
+
declare const KeycloakProvider: FC<KeycloakProviderProps>;
|
|
28
|
+
|
|
29
|
+
export { KeycloakProvider };
|
|
@@ -4,15 +4,12 @@ import '@bitspur/react-keycloak-core';
|
|
|
4
4
|
import '@bitspur/keycloak-js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* File: /
|
|
8
|
-
* Project:
|
|
9
|
-
* File Created:
|
|
7
|
+
* File: /src/provider/keycloakProvider.native.tsx
|
|
8
|
+
* Project: @multiplatform.one/keycloak
|
|
9
|
+
* File Created: 22-06-2023 10:07:56
|
|
10
10
|
* Author: Clay Risser
|
|
11
11
|
* -----
|
|
12
|
-
*
|
|
13
|
-
* Modified By: Clay Risser
|
|
14
|
-
* -----
|
|
15
|
-
* Risser Labs LLC (c) Copyright 2021 - 2022
|
|
12
|
+
* BitSpur (c) Copyright 2021 - 2023
|
|
16
13
|
*
|
|
17
14
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
18
15
|
* you may not use this file except in compliance with the License.
|
|
@@ -59,19 +59,19 @@ function _interopRequireDefault(obj) {
|
|
|
59
59
|
default: obj
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
|
-
var
|
|
62
|
+
var _chunkUBCNCE73js = require("../chunk-UBCNCE73.js");
|
|
63
63
|
require("../chunk-UBVYEZI3.js");
|
|
64
64
|
require("../chunk-6NDWOV55.js");
|
|
65
65
|
require("../chunk-KLLABHIC.js");
|
|
66
|
-
require("../chunk-
|
|
66
|
+
require("../chunk-HDNHCVXT.js");
|
|
67
67
|
require("../chunk-OYWAYMFN.js");
|
|
68
|
-
require("../chunk-
|
|
68
|
+
require("../chunk-E2X33LSD.js");
|
|
69
69
|
require("../chunk-3ZPHNEJL.js");
|
|
70
70
|
require("../chunk-YGNNHTFE.js");
|
|
71
71
|
require("../chunk-C2FNSVJO.js");
|
|
72
72
|
require("../chunk-A7UBOIAL.js");
|
|
73
73
|
require("../chunk-NWRANDZ6.js");
|
|
74
|
-
require("../chunk-
|
|
74
|
+
require("../chunk-KMAXXKJT.js");
|
|
75
75
|
// src/provider/keycloakProvider.native.tsx
|
|
76
76
|
var _react = require("react");
|
|
77
77
|
var _react2 = _interopRequireDefault(_react);
|
|
@@ -82,6 +82,6 @@ var KeycloakProvider = function(param) {
|
|
|
82
82
|
url: keycloakConfig.url
|
|
83
83
|
});
|
|
84
84
|
delete keycloakConfig.baseUrl;
|
|
85
|
-
return /* @__PURE__ */ _react2.default.createElement(_expokeycloakauth.KeycloakProvider, _object_spread({}, clonedKeycloakConfig), /* @__PURE__ */ _react2.default.createElement(
|
|
85
|
+
return /* @__PURE__ */ _react2.default.createElement(_expokeycloakauth.KeycloakProvider, _object_spread({}, clonedKeycloakConfig), /* @__PURE__ */ _react2.default.createElement(_chunkUBCNCE73js.AfterAuth, null, children));
|
|
86
86
|
};
|
|
87
87
|
exports.KeycloakProvider = KeycloakProvider;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AfterAuth
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-SK4YK6KE.mjs";
|
|
4
4
|
import "../chunk-AYKQVWMR.mjs";
|
|
5
5
|
import "../chunk-2GUOEPFY.mjs";
|
|
6
6
|
import "../chunk-NXTVYIBR.mjs";
|
|
7
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-VLUTEDDM.mjs";
|
|
8
8
|
import "../chunk-L5HMOY4M.mjs";
|
|
9
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-NU2SJ3ST.mjs";
|
|
10
10
|
import "../chunk-Y4XMF3R6.mjs";
|
|
11
11
|
import "../chunk-UOKDJT5L.mjs";
|
|
12
12
|
import "../chunk-AD6VPMID.mjs";
|
|
13
13
|
import "../chunk-64PPU7Q3.mjs";
|
|
14
14
|
import "../chunk-7MTPH6XK.mjs";
|
|
15
|
-
import "../chunk-
|
|
15
|
+
import "../chunk-S237YNYQ.mjs";
|
|
16
16
|
|
|
17
17
|
// src/provider/keycloakProvider.native.tsx
|
|
18
18
|
import React from "react";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare function useAuthState(): {
|
|
2
|
+
idToken: string;
|
|
3
|
+
refreshToken: string;
|
|
4
|
+
token: string;
|
|
5
|
+
} & {
|
|
6
|
+
setIdToken: (value: string) => void;
|
|
7
|
+
setRefreshToken: (value: string) => void;
|
|
8
|
+
setToken: (value: string) => void;
|
|
9
|
+
} & Record<string, Function>;
|
|
10
|
+
|
|
11
|
+
export { useAuthState };
|
package/lib/state/index.d.ts
CHANGED
|
@@ -1,26 +1,3 @@
|
|
|
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
1
|
declare function useAuthState(): {
|
|
25
2
|
idToken: string;
|
|
26
3
|
refreshToken: string;
|
package/lib/state/index.js
CHANGED