@multiplatform.one/keycloak 5.0.11 → 5.0.16
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/dist/cjs/index.js +2 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/index.native.js +4 -4
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/keycloak/base.js +1 -1
- package/dist/cjs/keycloak/base.js.map +1 -1
- package/dist/cjs/keycloak/base.native.js +1 -1
- package/dist/cjs/keycloak/base.native.js.map +1 -1
- package/dist/cjs/keycloak/index.electron.cjs +27 -3
- package/dist/cjs/keycloak/index.electron.js +17 -2
- package/dist/cjs/keycloak/index.electron.js.map +1 -1
- package/dist/cjs/keycloak/index.electron.native.js +52 -3
- package/dist/cjs/keycloak/index.electron.native.js.map +2 -2
- package/dist/cjs/keycloak/index.js +1 -1
- package/dist/cjs/keycloak/index.js.map +1 -1
- package/dist/cjs/keycloak/index.webext.cjs +54 -0
- package/dist/cjs/keycloak/index.webext.js +40 -0
- package/dist/cjs/keycloak/index.webext.js.map +6 -0
- package/dist/cjs/keycloak/index.webext.native.js +137 -0
- package/dist/cjs/keycloak/index.webext.native.js.map +6 -0
- package/dist/cjs/provider/AuthProvider/index.cjs +6 -6
- package/dist/cjs/provider/AuthProvider/index.electron.cjs +3 -3
- package/dist/cjs/provider/AuthProvider/index.electron.js +4 -3
- package/dist/cjs/provider/AuthProvider/index.electron.js.map +1 -1
- package/dist/cjs/provider/AuthProvider/index.electron.native.js +4 -5
- package/dist/cjs/provider/AuthProvider/index.electron.native.js.map +1 -1
- package/dist/cjs/provider/AuthProvider/index.js +7 -6
- package/dist/cjs/provider/AuthProvider/index.js.map +1 -1
- package/dist/cjs/provider/AuthProvider/index.native.js +9 -8
- package/dist/cjs/provider/AuthProvider/index.native.js.map +1 -1
- package/dist/cjs/provider/AuthProvider/index.webext.cjs +223 -0
- package/dist/cjs/provider/AuthProvider/index.webext.js +244 -0
- package/dist/cjs/provider/AuthProvider/index.webext.js.map +6 -0
- package/dist/cjs/provider/AuthProvider/index.webext.native.js +299 -0
- package/dist/cjs/provider/AuthProvider/index.webext.native.js.map +6 -0
- package/dist/cjs/session/index.electron.cjs +32 -0
- package/dist/cjs/session/index.electron.js +27 -0
- package/dist/cjs/session/index.electron.js.map +6 -0
- package/dist/cjs/session/index.electron.native.js +33 -0
- package/dist/cjs/session/index.electron.native.js.map +6 -0
- package/dist/cjs/session/index.webext.cjs +32 -0
- package/dist/cjs/session/index.webext.js +27 -0
- package/dist/cjs/session/index.webext.js.map +6 -0
- package/dist/cjs/session/index.webext.native.js +33 -0
- package/dist/cjs/session/index.webext.native.js.map +6 -0
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.mjs +2 -2
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/index.native.js +2 -2
- package/dist/esm/index.native.js.map +1 -1
- package/dist/esm/keycloak/base.js +1 -1
- package/dist/esm/keycloak/base.mjs +1 -1
- package/dist/esm/keycloak/base.native.js +1 -1
- package/dist/esm/keycloak/index.electron.js +23 -2
- package/dist/esm/keycloak/index.electron.js.map +1 -1
- package/dist/esm/keycloak/index.electron.mjs +25 -2
- package/dist/esm/keycloak/index.electron.mjs.map +1 -1
- package/dist/esm/keycloak/index.electron.native.js +54 -2
- package/dist/esm/keycloak/index.electron.native.js.map +2 -2
- package/dist/esm/keycloak/index.js +2 -2
- package/dist/esm/keycloak/index.mjs +2 -2
- package/dist/esm/keycloak/index.webext.js +30 -0
- package/dist/esm/keycloak/index.webext.js.map +6 -0
- package/dist/esm/keycloak/index.webext.mjs +29 -0
- package/dist/esm/keycloak/index.webext.mjs.map +1 -0
- package/dist/esm/keycloak/index.webext.native.js +117 -0
- package/dist/esm/keycloak/index.webext.native.js.map +6 -0
- package/dist/esm/provider/AuthProvider/index.electron.js +4 -3
- package/dist/esm/provider/AuthProvider/index.electron.js.map +1 -1
- package/dist/esm/provider/AuthProvider/index.electron.mjs +3 -3
- package/dist/esm/provider/AuthProvider/index.electron.mjs.map +1 -1
- package/dist/esm/provider/AuthProvider/index.electron.native.js +4 -5
- package/dist/esm/provider/AuthProvider/index.electron.native.js.map +1 -1
- package/dist/esm/provider/AuthProvider/index.js +7 -6
- package/dist/esm/provider/AuthProvider/index.js.map +1 -1
- package/dist/esm/provider/AuthProvider/index.mjs +6 -6
- package/dist/esm/provider/AuthProvider/index.mjs.map +1 -1
- package/dist/esm/provider/AuthProvider/index.native.js +9 -8
- package/dist/esm/provider/AuthProvider/index.native.js.map +1 -1
- package/dist/esm/provider/AuthProvider/index.webext.js +231 -0
- package/dist/esm/provider/AuthProvider/index.webext.js.map +6 -0
- package/dist/esm/provider/AuthProvider/index.webext.mjs +189 -0
- package/dist/esm/provider/AuthProvider/index.webext.mjs.map +1 -0
- package/dist/esm/provider/AuthProvider/index.webext.native.js +281 -0
- package/dist/esm/provider/AuthProvider/index.webext.native.js.map +6 -0
- package/dist/esm/session/index.electron.js +11 -0
- package/dist/esm/session/index.electron.js.map +6 -0
- package/dist/esm/session/index.electron.mjs +8 -0
- package/dist/esm/session/index.electron.mjs.map +1 -0
- package/dist/esm/session/index.electron.native.js +11 -0
- package/dist/esm/session/index.electron.native.js.map +6 -0
- package/dist/esm/session/index.webext.js +11 -0
- package/dist/esm/session/index.webext.js.map +6 -0
- package/dist/esm/session/index.webext.mjs +8 -0
- package/dist/esm/session/index.webext.mjs.map +1 -0
- package/dist/esm/session/index.webext.native.js +11 -0
- package/dist/esm/session/index.webext.native.js.map +6 -0
- package/dist/jsx/index.js +2 -2
- package/dist/jsx/index.js.map +1 -1
- package/dist/jsx/index.mjs +2 -2
- package/dist/jsx/index.mjs.map +1 -1
- package/dist/jsx/index.native.js +2 -2
- package/dist/jsx/index.native.js.map +1 -1
- package/dist/jsx/keycloak/base.js +1 -1
- package/dist/jsx/keycloak/base.mjs +1 -1
- package/dist/jsx/keycloak/base.native.js +1 -1
- package/dist/jsx/keycloak/index.electron.js +23 -2
- package/dist/jsx/keycloak/index.electron.js.map +1 -1
- package/dist/jsx/keycloak/index.electron.mjs +25 -2
- package/dist/jsx/keycloak/index.electron.mjs.map +1 -1
- package/dist/jsx/keycloak/index.electron.native.js +54 -2
- package/dist/jsx/keycloak/index.electron.native.js.map +2 -2
- package/dist/jsx/keycloak/index.js +2 -2
- package/dist/jsx/keycloak/index.mjs +2 -2
- package/dist/jsx/keycloak/index.webext.js +30 -0
- package/dist/jsx/keycloak/index.webext.js.map +6 -0
- package/dist/jsx/keycloak/index.webext.mjs +29 -0
- package/dist/jsx/keycloak/index.webext.mjs.map +1 -0
- package/dist/jsx/keycloak/index.webext.native.js +117 -0
- package/dist/jsx/keycloak/index.webext.native.js.map +6 -0
- package/dist/jsx/provider/AuthProvider/index.electron.js +4 -3
- package/dist/jsx/provider/AuthProvider/index.electron.js.map +1 -1
- package/dist/jsx/provider/AuthProvider/index.electron.mjs +3 -3
- package/dist/jsx/provider/AuthProvider/index.electron.mjs.map +1 -1
- package/dist/jsx/provider/AuthProvider/index.electron.native.js +4 -5
- package/dist/jsx/provider/AuthProvider/index.electron.native.js.map +1 -1
- package/dist/jsx/provider/AuthProvider/index.js +7 -6
- package/dist/jsx/provider/AuthProvider/index.js.map +1 -1
- package/dist/jsx/provider/AuthProvider/index.mjs +6 -6
- package/dist/jsx/provider/AuthProvider/index.mjs.map +1 -1
- package/dist/jsx/provider/AuthProvider/index.native.js +9 -8
- package/dist/jsx/provider/AuthProvider/index.native.js.map +1 -1
- package/dist/jsx/provider/AuthProvider/index.webext.js +231 -0
- package/dist/jsx/provider/AuthProvider/index.webext.js.map +6 -0
- package/dist/jsx/provider/AuthProvider/index.webext.mjs +189 -0
- package/dist/jsx/provider/AuthProvider/index.webext.mjs.map +1 -0
- package/dist/jsx/provider/AuthProvider/index.webext.native.js +281 -0
- package/dist/jsx/provider/AuthProvider/index.webext.native.js.map +6 -0
- package/dist/jsx/session/index.electron.js +11 -0
- package/dist/jsx/session/index.electron.js.map +6 -0
- package/dist/jsx/session/index.electron.mjs +8 -0
- package/dist/jsx/session/index.electron.mjs.map +1 -0
- package/dist/jsx/session/index.electron.native.js +11 -0
- package/dist/jsx/session/index.electron.native.js.map +6 -0
- package/dist/jsx/session/index.webext.js +11 -0
- package/dist/jsx/session/index.webext.js.map +6 -0
- package/dist/jsx/session/index.webext.mjs +8 -0
- package/dist/jsx/session/index.webext.mjs.map +1 -0
- package/dist/jsx/session/index.webext.native.js +11 -0
- package/dist/jsx/session/index.webext.native.js.map +6 -0
- package/package.json +10 -12
- package/src/index.ts +23 -2
- package/src/keycloak/base.ts +2 -2
- package/src/keycloak/index.electron.ts +50 -5
- package/src/keycloak/index.ts +3 -3
- package/src/keycloak/index.webext.ts +72 -0
- package/src/one.ts +3 -3
- package/src/provider/AuthProvider/index.electron.tsx +13 -4
- package/src/provider/AuthProvider/index.native.tsx +18 -8
- package/src/provider/AuthProvider/index.tsx +14 -5
- package/src/provider/AuthProvider/index.webext.tsx +419 -0
- package/src/session/index.electron.ts +33 -0
- package/src/session/index.webext.ts +33 -0
- package/types/Authenticated.d.ts +29 -0
- package/types/Authenticated.d.ts.map +1 -0
- package/types/Loading.d.ts +26 -0
- package/types/Loading.d.ts.map +1 -0
- package/types/authConfig.d.ts +11 -0
- package/types/authConfig.d.ts.map +1 -0
- package/types/hooks/index.d.ts +24 -0
- package/types/hooks/index.d.ts.map +1 -0
- package/types/hooks/useAuthConfig.d.ts +2 -0
- package/types/hooks/useAuthConfig.d.ts.map +1 -0
- package/types/hooks/useTokensFromQuery/index.d.ts +2 -0
- package/types/hooks/useTokensFromQuery/index.d.ts.map +1 -0
- package/types/hooks/useTokensFromQuery/index.native.d.ts +2 -0
- package/types/hooks/useTokensFromQuery/index.native.d.ts.map +1 -0
- package/types/hooks/useTokensFromState.d.ts +2 -0
- package/types/hooks/useTokensFromState.d.ts.map +1 -0
- package/types/index.d.ts +28 -0
- package/types/index.d.ts.map +1 -0
- package/types/keycloak/base.d.ts +51 -0
- package/types/keycloak/base.d.ts.map +1 -0
- package/types/keycloak/config.d.ts +8 -0
- package/types/keycloak/config.d.ts.map +1 -0
- package/types/keycloak/context.d.ts +4 -0
- package/types/keycloak/context.d.ts.map +1 -0
- package/types/keycloak/index.d.ts +15 -0
- package/types/keycloak/index.d.ts.map +1 -0
- package/types/keycloak/index.electron.d.ts +12 -0
- package/types/keycloak/index.electron.d.ts.map +1 -0
- package/types/keycloak/index.native.d.ts +27 -0
- package/types/keycloak/index.native.d.ts.map +1 -0
- package/types/keycloak/index.webext.d.ts +12 -0
- package/types/keycloak/index.webext.d.ts.map +1 -0
- package/types/one.d.ts +27 -0
- package/types/one.d.ts.map +1 -0
- package/types/provider/AfterAuth.d.ts +26 -0
- package/types/provider/AfterAuth.d.ts.map +1 -0
- package/types/provider/AuthProvider/index.d.ts +23 -0
- package/types/provider/AuthProvider/index.d.ts.map +1 -0
- package/types/provider/AuthProvider/index.electron.d.ts +23 -0
- package/types/provider/AuthProvider/index.electron.d.ts.map +1 -0
- package/types/provider/AuthProvider/index.native.d.ts +23 -0
- package/types/provider/AuthProvider/index.native.d.ts.map +1 -0
- package/types/provider/AuthProvider/index.webext.d.ts +23 -0
- package/types/provider/AuthProvider/index.webext.d.ts.map +1 -0
- package/types/provider/AuthProvider/shared.d.ts +53 -0
- package/types/provider/AuthProvider/shared.d.ts.map +1 -0
- package/types/provider/KeycloakProvider.d.ts +30 -0
- package/types/provider/KeycloakProvider.d.ts.map +1 -0
- package/types/provider/index.d.ts +24 -0
- package/types/provider/index.d.ts.map +1 -0
- package/types/session/index.d.ts +16 -0
- package/types/session/index.d.ts.map +1 -0
- package/types/session/index.electron.d.ts +5 -0
- package/types/session/index.electron.d.ts.map +1 -0
- package/types/session/index.native.d.ts +5 -0
- package/types/session/index.native.d.ts.map +1 -0
- package/types/session/index.webext.d.ts +5 -0
- package/types/session/index.webext.d.ts.map +1 -0
- package/types/state.d.ts +9 -0
- package/types/state.d.ts.map +1 -0
- package/types/token.d.ts +16 -0
- package/types/token.d.ts.map +1 -0
- package/types/types.d.ts +19 -0
- package/types/types.d.ts.map +1 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* File: /src/Authenticated.tsx
|
|
3
|
+
* Project: @multiplatform.one/keycloak
|
|
4
|
+
* File Created: 19-11-2024 20:26:31
|
|
5
|
+
* Author: Clay Risser
|
|
6
|
+
* -----
|
|
7
|
+
* BitSpur (c) Copyright 2021 - 2024
|
|
8
|
+
*
|
|
9
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
10
|
+
* you may not use this file except in compliance with the License.
|
|
11
|
+
* You may obtain a copy of the License at
|
|
12
|
+
*
|
|
13
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
14
|
+
*
|
|
15
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
16
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
17
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18
|
+
* See the License for the specific language governing permissions and
|
|
19
|
+
* limitations under the License.
|
|
20
|
+
*/
|
|
21
|
+
import { type ComponentType, type PropsWithChildren } from "react";
|
|
22
|
+
export interface AuthenticatedProps extends PropsWithChildren {
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
loadingComponent?: ComponentType;
|
|
25
|
+
loggedOutComponent?: ComponentType;
|
|
26
|
+
}
|
|
27
|
+
export declare function Authenticated({ children, disabled, loggedOutComponent, loadingComponent, }: AuthenticatedProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export declare function withAuthenticated<P extends object>(Component: ComponentType<P>, options?: AuthenticatedProps): (props: P) => import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
//# sourceMappingURL=Authenticated.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Authenticated.d.ts","sourceRoot":"","sources":["../src/Authenticated.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAIH,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,iBAAiB,EAAa,MAAM,OAAO,CAAC;AAO9E,MAAM,WAAW,kBAAmB,SAAQ,iBAAiB;IAC3D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gBAAgB,CAAC,EAAE,aAAa,CAAC;IACjC,kBAAkB,CAAC,EAAE,aAAa,CAAC;CACpC;AAED,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,QAAQ,EACR,kBAAkB,EAClB,gBAAgB,GACjB,EAAE,kBAAkB,2CAoCpB;AAED,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,MAAM,EAChD,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC,EAC3B,OAAO,GAAE,kBAAuB,WAEjB,CAAC,6CAKjB"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* File: /src/Loading.tsx
|
|
3
|
+
* Project: @multiplatform.one/keycloak
|
|
4
|
+
* File Created: 01-01-1970 00:00:00
|
|
5
|
+
* Author: Clay Risser
|
|
6
|
+
* -----
|
|
7
|
+
* BitSpur (c) Copyright 2021 - 2024
|
|
8
|
+
*
|
|
9
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
10
|
+
* you may not use this file except in compliance with the License.
|
|
11
|
+
* You may obtain a copy of the License at
|
|
12
|
+
*
|
|
13
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
14
|
+
*
|
|
15
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
16
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
17
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18
|
+
* See the License for the specific language governing permissions and
|
|
19
|
+
* limitations under the License.
|
|
20
|
+
*/
|
|
21
|
+
import type { ComponentType } from "react";
|
|
22
|
+
export interface LoadingProps {
|
|
23
|
+
loadingComponent?: ComponentType;
|
|
24
|
+
}
|
|
25
|
+
export declare function Loading({ loadingComponent }: LoadingProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
//# sourceMappingURL=Loading.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Loading.d.ts","sourceRoot":"","sources":["../src/Loading.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAI3C,MAAM,WAAW,YAAY;IAC3B,gBAAgB,CAAC,EAAE,aAAa,CAAC;CAClC;AAED,wBAAgB,OAAO,CAAC,EAAE,gBAAgB,EAAE,EAAE,YAAY,2CAOzD"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const defaultAuthConfig: AuthConfig;
|
|
3
|
+
export declare const AuthConfigContext: import("react").Context<AuthConfig>;
|
|
4
|
+
export interface AuthConfig {
|
|
5
|
+
debug?: boolean;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
iframeSso?: boolean;
|
|
8
|
+
loginRedirectUri?: string;
|
|
9
|
+
messageHandlerKeys?: string[];
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=authConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authConfig.d.ts","sourceRoot":"","sources":["../src/authConfig.ts"],"names":[],"mappings":";AAuBA,eAAO,MAAM,iBAAiB,EAAE,UAAe,CAAC;AAEhD,eAAO,MAAM,iBAAiB,qCAA+C,CAAC;AAE9E,MAAM,WAAW,UAAU;IACzB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC/B"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* File: /src/hooks/index.ts
|
|
3
|
+
* Project: @multiplatform.one/keycloak
|
|
4
|
+
* File Created: 19-11-2024 20:26:31
|
|
5
|
+
* Author: Clay Risser
|
|
6
|
+
* -----
|
|
7
|
+
* BitSpur (c) Copyright 2021 - 2024
|
|
8
|
+
*
|
|
9
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
10
|
+
* you may not use this file except in compliance with the License.
|
|
11
|
+
* You may obtain a copy of the License at
|
|
12
|
+
*
|
|
13
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
14
|
+
*
|
|
15
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
16
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
17
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18
|
+
* See the License for the specific language governing permissions and
|
|
19
|
+
* limitations under the License.
|
|
20
|
+
*/
|
|
21
|
+
export * from "./useAuthConfig";
|
|
22
|
+
export * from "./useTokensFromQuery/index";
|
|
23
|
+
export * from "./useTokensFromState";
|
|
24
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,cAAc,iBAAiB,CAAC;AAChC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAuthConfig.d.ts","sourceRoot":"","sources":["../../src/hooks/useAuthConfig.ts"],"names":[],"mappings":"AAwBA,wBAAgB,aAAa,uCAE5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/useTokensFromQuery/index.ts"],"names":[],"mappings":"AAwBA,wBAAgB,kBAAkB,YAWjC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../src/hooks/useTokensFromQuery/index.native.ts"],"names":[],"mappings":"AAqBA,eAAO,MAAM,kBAAkB,eAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTokensFromState.d.ts","sourceRoot":"","sources":["../../src/hooks/useTokensFromState.ts"],"names":[],"mappings":"AAwBA,wBAAgB,kBAAkB,wBAIjC"}
|
package/types/index.d.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* File: /src/index.ts
|
|
3
|
+
* Project: @multiplatform.one/keycloak
|
|
4
|
+
* File Created: 19-11-2024 20:26:31
|
|
5
|
+
* Author: Clay Risser
|
|
6
|
+
* -----
|
|
7
|
+
* BitSpur (c) Copyright 2021 - 2024
|
|
8
|
+
*
|
|
9
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
10
|
+
* you may not use this file except in compliance with the License.
|
|
11
|
+
* You may obtain a copy of the License at
|
|
12
|
+
*
|
|
13
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
14
|
+
*
|
|
15
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
16
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
17
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18
|
+
* See the License for the specific language governing permissions and
|
|
19
|
+
* limitations under the License.
|
|
20
|
+
*/
|
|
21
|
+
export * from "./Authenticated";
|
|
22
|
+
export * from "./authConfig";
|
|
23
|
+
export * from "./hooks/index";
|
|
24
|
+
export * from "./keycloak/index";
|
|
25
|
+
export * from "./provider/index";
|
|
26
|
+
export * from "./session/index";
|
|
27
|
+
export * from "./types";
|
|
28
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAqBA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { AuthRequestPromptOptions } from "expo-auth-session";
|
|
2
|
+
import type KeycloakClient from "keycloak-js";
|
|
3
|
+
import type { KeycloakLoginOptions as KeycloakJsLoginOptions, KeycloakLogoutOptions as KeycloakJsLogoutOptions } from "keycloak-js";
|
|
4
|
+
import type { Session } from "../session/index";
|
|
5
|
+
import type { AccessTokenParsed, TokenParsed } from "../token";
|
|
6
|
+
import type { KeycloakMock } from "../types";
|
|
7
|
+
import type { KeycloakConfig } from "./config";
|
|
8
|
+
export declare class BaseKeycloak {
|
|
9
|
+
readonly config: KeycloakConfig;
|
|
10
|
+
authenticated: boolean;
|
|
11
|
+
clientId: string;
|
|
12
|
+
email?: string;
|
|
13
|
+
idToken?: string;
|
|
14
|
+
idTokenParsed?: TokenParsed;
|
|
15
|
+
realm: string;
|
|
16
|
+
realmAccess?: RealmAccess;
|
|
17
|
+
refreshToken?: string;
|
|
18
|
+
refreshTokenParsed?: TokenParsed;
|
|
19
|
+
resourceAccess?: ResourceAccess;
|
|
20
|
+
sessionId?: string;
|
|
21
|
+
subject?: string;
|
|
22
|
+
token?: string;
|
|
23
|
+
tokenParsed?: AccessTokenParsed;
|
|
24
|
+
username?: string;
|
|
25
|
+
protected _keycloakClient?: KeycloakClient;
|
|
26
|
+
protected _login?: (_options: KeycloakLoginOptions) => Promise<undefined>;
|
|
27
|
+
protected _logout?: (_options: KeycloakLogoutOptions) => Promise<undefined>;
|
|
28
|
+
protected _mock?: KeycloakMock;
|
|
29
|
+
constructor(config: KeycloakConfig, input?: string | KeycloakClient | KeycloakMock | Session, idToken?: string, refreshToken?: string, login?: (_options: KeycloakLoginOptions) => Promise<undefined>, logout?: (_options: KeycloakLogoutOptions) => Promise<undefined>);
|
|
30
|
+
protected _handleInputObject(input: KeycloakClient | KeycloakMock | Session): void;
|
|
31
|
+
protected _parseTokens(): void;
|
|
32
|
+
protected _clear(): void;
|
|
33
|
+
protected _sync(): void;
|
|
34
|
+
getUserInfo(): Promise<any>;
|
|
35
|
+
login(options?: KeycloakLoginOptions): Promise<void>;
|
|
36
|
+
logout(options?: KeycloakLogoutOptions): Promise<void>;
|
|
37
|
+
}
|
|
38
|
+
export declare function useKeycloak(): import(".").Keycloak | null | undefined;
|
|
39
|
+
export type KeycloakLogoutOptions = KeycloakJsLogoutOptions;
|
|
40
|
+
export type KeycloakLoginOptions = KeycloakJsLoginOptions & AuthRequestPromptOptions & {
|
|
41
|
+
redirect?: boolean;
|
|
42
|
+
};
|
|
43
|
+
export interface ResourceAccess {
|
|
44
|
+
[clientId: string]: {
|
|
45
|
+
roles: string[];
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
export interface RealmAccess {
|
|
49
|
+
roles: string[];
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=base.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/keycloak/base.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAElE,OAAO,KAAK,cAAc,MAAM,aAAa,CAAC;AAC9C,OAAO,KAAK,EACV,oBAAoB,IAAI,sBAAsB,EAC9C,qBAAqB,IAAI,uBAAuB,EACjD,MAAM,aAAa,CAAC;AAGrB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC/D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAG/C,qBAAa,YAAY;aAuBL,MAAM,EAAE,cAAc;IAtBjC,aAAa,UAAS;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,WAAW,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kBAAkB,CAAC,EAAE,WAAW,CAAC;IACjC,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAEzB,SAAS,CAAC,eAAe,CAAC,EAAE,cAAc,CAAC;IAC3C,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,oBAAoB,KAAK,OAAO,CAAC,SAAS,CAAC,CAAC;IAC1E,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,qBAAqB,KAAK,OAAO,CAAC,SAAS,CAAC,CAAC;IAC5E,SAAS,CAAC,KAAK,CAAC,EAAE,YAAY,CAAC;gBAGb,MAAM,EAAE,cAAc,EACtC,KAAK,CAAC,EAAE,MAAM,GAAG,cAAc,GAAG,YAAY,GAAG,OAAO,EACxD,OAAO,CAAC,EAAE,MAAM,EAChB,YAAY,CAAC,EAAE,MAAM,EACrB,KAAK,CAAC,EAAE,CAAC,QAAQ,EAAE,oBAAoB,KAAK,OAAO,CAAC,SAAS,CAAC,EAC9D,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,qBAAqB,KAAK,OAAO,CAAC,SAAS,CAAC;IAiBlE,SAAS,CAAC,kBAAkB,CAAC,KAAK,EAAE,cAAc,GAAG,YAAY,GAAG,OAAO;IAQ3E,SAAS,CAAC,YAAY;IAYtB,SAAS,CAAC,MAAM;IAgBhB,SAAS,CAAC,KAAK;IA0CT,WAAW;IAeX,KAAK,CAAC,OAAO,GAAE,oBAAyB;IAUxC,MAAM,CAAC,OAAO,GAAE,qBAA0B;CAQjD;AAED,wBAAgB,WAAW,4CAI1B;AAED,MAAM,MAAM,qBAAqB,GAAG,uBAAuB,CAAC;AAC5D,MAAM,MAAM,oBAAoB,GAAG,sBAAsB,GACvD,wBAAwB,GAAG;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAEpD,MAAM,WAAW,cAAc;IAC7B,CAAC,QAAQ,EAAE,MAAM,GAAG;QAClB,KAAK,EAAE,MAAM,EAAE,CAAC;KACjB,CAAC;CACH;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { KeycloakConfig as KeycloakJsConfig } from "keycloak-js";
|
|
3
|
+
export interface KeycloakConfig extends KeycloakJsConfig {
|
|
4
|
+
publicClientId?: string;
|
|
5
|
+
scopes?: string[];
|
|
6
|
+
}
|
|
7
|
+
export declare const KeycloakConfigContext: import("react").Context<KeycloakConfig>;
|
|
8
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/keycloak/config.ts"],"names":[],"mappings":";AAqBA,OAAO,KAAK,EAAE,cAAc,IAAI,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAGtE,MAAM,WAAW,cAAe,SAAQ,gBAAgB;IACtD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,eAAO,MAAM,qBAAqB,yCAIhC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/keycloak/context.ts"],"names":[],"mappings":";AAsBA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,GAAG,CAAC;AAElC,eAAO,MAAM,eAAe,+CAAiD,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type KeycloakClient from "keycloak-js";
|
|
2
|
+
import { type SignInAuthorizationParams, type SignInOptions, type SignInResponse } from "next-auth/react";
|
|
3
|
+
import type { Session } from "../session/index";
|
|
4
|
+
import type { KeycloakMock } from "../types";
|
|
5
|
+
import { BaseKeycloak, type KeycloakLoginOptions, type KeycloakLogoutOptions } from "./base";
|
|
6
|
+
export declare class Keycloak extends BaseKeycloak {
|
|
7
|
+
protected _handleInputObject(input: KeycloakClient | KeycloakMock | Session): void;
|
|
8
|
+
login(options?: KeycloakLoginOptions): Promise<void>;
|
|
9
|
+
logout(options?: KeycloakLogoutOptions): Promise<void>;
|
|
10
|
+
}
|
|
11
|
+
export declare function useKeycloak(): Keycloak | null | undefined;
|
|
12
|
+
export declare function cookieSignIn(options?: SignInOptions, authorizationParams?: SignInAuthorizationParams): Promise<SignInResponse | undefined>;
|
|
13
|
+
export * from "./base";
|
|
14
|
+
export * from "./config";
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/keycloak/index.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,cAAc,MAAM,aAAa,CAAC;AAE9C,OAAO,EACL,KAAK,yBAAyB,EAC9B,KAAK,aAAa,EAClB,KAAK,cAAc,EAKpB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAEhD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EACL,YAAY,EACZ,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC3B,MAAM,QAAQ,CAAC;AAIhB,qBAAa,QAAS,SAAQ,YAAY;IACxC,SAAS,CAAC,kBAAkB,CAAC,KAAK,EAAE,cAAc,GAAG,YAAY,GAAG,OAAO;IAcrE,KAAK,CAAC,OAAO,GAAE,oBAAyB;IAiBxC,MAAM,CAAC,OAAO,GAAE,qBAA0B;CAajD;AAED,wBAAgB,WAAW,gCAmB1B;AAED,wBAAsB,YAAY,CAChC,OAAO,CAAC,EAAE,aAAa,EACvB,mBAAmB,CAAC,EAAE,yBAAyB,GAC9C,OAAO,CAAC,cAAc,GAAG,SAAS,CAAC,CAkDrC;AAED,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type KeycloakClient from "keycloak-js";
|
|
2
|
+
import type { KeycloakMock } from "../types";
|
|
3
|
+
import { BaseKeycloak, type KeycloakLoginOptions, type KeycloakLogoutOptions } from "./base";
|
|
4
|
+
export declare class Keycloak extends BaseKeycloak {
|
|
5
|
+
protected _handleInputObject(input: KeycloakClient | KeycloakMock): void;
|
|
6
|
+
login(options?: KeycloakLoginOptions): Promise<void>;
|
|
7
|
+
logout(options?: KeycloakLogoutOptions): Promise<void>;
|
|
8
|
+
}
|
|
9
|
+
export declare function useKeycloak(): import(".").Keycloak | null | undefined;
|
|
10
|
+
export * from "./base";
|
|
11
|
+
export * from "./config";
|
|
12
|
+
//# sourceMappingURL=index.electron.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.electron.d.ts","sourceRoot":"","sources":["../../src/keycloak/index.electron.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,cAAc,MAAM,aAAa,CAAC;AAG9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EACL,YAAY,EACZ,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC3B,MAAM,QAAQ,CAAC;AAIhB,qBAAa,QAAS,SAAQ,YAAY;IACxC,SAAS,CAAC,kBAAkB,CAAC,KAAK,EAAE,cAAc,GAAG,YAAY;IAQ3D,KAAK,CAAC,OAAO,GAAE,oBAAyB;IAUxC,MAAM,CAAC,OAAO,GAAE,qBAA0B;CAQjD;AAED,wBAAgB,WAAW,4CAM1B;AAED,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* File: /src/keycloak/index.native.ts
|
|
3
|
+
* Project: @multiplatform.one/keycloak
|
|
4
|
+
* File Created: 19-11-2024 20:26:31
|
|
5
|
+
* Author: Clay Risser
|
|
6
|
+
* -----
|
|
7
|
+
* BitSpur (c) Copyright 2021 - 2024
|
|
8
|
+
*
|
|
9
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
10
|
+
* you may not use this file except in compliance with the License.
|
|
11
|
+
* You may obtain a copy of the License at
|
|
12
|
+
*
|
|
13
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
14
|
+
*
|
|
15
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
16
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
17
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18
|
+
* See the License for the specific language governing permissions and
|
|
19
|
+
* limitations under the License.
|
|
20
|
+
*/
|
|
21
|
+
import { BaseKeycloak } from "./base";
|
|
22
|
+
export declare class Keycloak extends BaseKeycloak {
|
|
23
|
+
}
|
|
24
|
+
export declare function useKeycloak(): import(".").Keycloak | Keycloak | null | undefined;
|
|
25
|
+
export * from "./base";
|
|
26
|
+
export * from "./config";
|
|
27
|
+
//# sourceMappingURL=index.native.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../src/keycloak/index.native.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAKH,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAItC,qBAAa,QAAS,SAAQ,YAAY;CAAG;AAE7C,wBAAgB,WAAW,uDAY1B;AAED,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type KeycloakClient from "keycloak-js";
|
|
2
|
+
import type { KeycloakMock } from "../types";
|
|
3
|
+
import { BaseKeycloak, type KeycloakLoginOptions, type KeycloakLogoutOptions } from "./base";
|
|
4
|
+
export declare class Keycloak extends BaseKeycloak {
|
|
5
|
+
protected _handleInputObject(input: KeycloakClient | KeycloakMock): void;
|
|
6
|
+
login(options?: KeycloakLoginOptions): Promise<void>;
|
|
7
|
+
logout(options?: KeycloakLogoutOptions): Promise<void>;
|
|
8
|
+
}
|
|
9
|
+
export declare function useKeycloak(): import(".").Keycloak | null | undefined;
|
|
10
|
+
export * from "./base";
|
|
11
|
+
export * from "./config";
|
|
12
|
+
//# sourceMappingURL=index.webext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.webext.d.ts","sourceRoot":"","sources":["../../src/keycloak/index.webext.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,cAAc,MAAM,aAAa,CAAC;AAG9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EACL,YAAY,EACZ,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC3B,MAAM,QAAQ,CAAC;AAIhB,qBAAa,QAAS,SAAQ,YAAY;IACxC,SAAS,CAAC,kBAAkB,CAAC,KAAK,EAAE,cAAc,GAAG,YAAY;IAQ3D,KAAK,CAAC,OAAO,GAAE,oBAAyB;IAUxC,MAAM,CAAC,OAAO,GAAE,qBAA0B;CAQjD;AAED,wBAAgB,WAAW,4CAM1B;AAED,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC"}
|
package/types/one.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { AuthConfig } from "@auth/core";
|
|
2
|
+
import type { JWT } from "@auth/core/jwt";
|
|
3
|
+
import type { OAuthUserConfig } from "@auth/core/providers";
|
|
4
|
+
import type { AccessTokenParsed } from "./token";
|
|
5
|
+
export declare function createAuthConfig(config: AuthHandlerConfig): AuthConfig;
|
|
6
|
+
export interface AuthToken extends JWT {
|
|
7
|
+
accessToken?: string;
|
|
8
|
+
decoded: AccessTokenParsed;
|
|
9
|
+
err?: Error;
|
|
10
|
+
expiresAt: number;
|
|
11
|
+
idToken?: string;
|
|
12
|
+
refreshToken: string;
|
|
13
|
+
roles: string[];
|
|
14
|
+
}
|
|
15
|
+
export interface KeycloakOptions extends OAuthUserConfig<any> {
|
|
16
|
+
adminPassword?: string;
|
|
17
|
+
adminUsername?: string;
|
|
18
|
+
baseUrl?: string;
|
|
19
|
+
realm?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface AuthHandlerConfig {
|
|
22
|
+
baseUrl: string;
|
|
23
|
+
keycloak: KeycloakOptions;
|
|
24
|
+
auth?: Partial<AuthConfig>;
|
|
25
|
+
scopes?: string[];
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=one.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"one.d.ts","sourceRoot":"","sources":["../src/one.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAI5D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAUjD,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,iBAAiB,cA2EzD;AAmCD,MAAM,WAAW,SAAU,SAAQ,GAAG;IACpC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,iBAAiB,CAAC;IAC3B,GAAG,CAAC,EAAE,KAAK,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,MAAM,WAAW,eAAgB,SAAQ,eAAe,CAAC,GAAG,CAAC;IAC3D,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,eAAe,CAAC;IAC1B,IAAI,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* File: /src/provider/AfterAuth.tsx
|
|
3
|
+
* Project: @multiplatform.one/keycloak
|
|
4
|
+
* File Created: 10-01-2024 12:41:33
|
|
5
|
+
* Author: Clay Risser
|
|
6
|
+
* -----
|
|
7
|
+
* BitSpur (c) Copyright 2021 - 2024
|
|
8
|
+
*
|
|
9
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
10
|
+
* you may not use this file except in compliance with the License.
|
|
11
|
+
* You may obtain a copy of the License at
|
|
12
|
+
*
|
|
13
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
14
|
+
*
|
|
15
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
16
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
17
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18
|
+
* See the License for the specific language governing permissions and
|
|
19
|
+
* limitations under the License.
|
|
20
|
+
*/
|
|
21
|
+
import { type ComponentType, type PropsWithChildren } from "react";
|
|
22
|
+
export interface AfterAuthProps extends PropsWithChildren {
|
|
23
|
+
loadingComponent?: ComponentType;
|
|
24
|
+
}
|
|
25
|
+
export declare function AfterAuth({ children, loadingComponent }: AfterAuthProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
//# sourceMappingURL=AfterAuth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AfterAuth.d.ts","sourceRoot":"","sources":["../../src/provider/AfterAuth.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAGH,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,iBAAiB,EAAa,MAAM,OAAO,CAAC;AAM9E,MAAM,WAAW,cAAe,SAAQ,iBAAiB;IACvD,gBAAgB,CAAC,EAAE,aAAa,CAAC;CAClC;AAED,wBAAgB,SAAS,CAAC,EAAE,QAAQ,EAAE,gBAAgB,EAAE,EAAE,cAAc,2CAqDvE"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* File: /src/provider/AuthProvider/index.tsx
|
|
3
|
+
* Project: @multiplatform.one/keycloak
|
|
4
|
+
* File Created: 19-11-2024 20:26:31
|
|
5
|
+
* Author: Clay Risser
|
|
6
|
+
* -----
|
|
7
|
+
* BitSpur (c) Copyright 2021 - 2024
|
|
8
|
+
*
|
|
9
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
10
|
+
* you may not use this file except in compliance with the License.
|
|
11
|
+
* You may obtain a copy of the License at
|
|
12
|
+
*
|
|
13
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
14
|
+
*
|
|
15
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
16
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
17
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18
|
+
* See the License for the specific language governing permissions and
|
|
19
|
+
* limitations under the License.
|
|
20
|
+
*/
|
|
21
|
+
import type { AuthProviderProps } from "./shared";
|
|
22
|
+
export declare function AuthProvider({ children, disabled, keycloakConfig, keycloakInitOptions, loadingComponent, sessionProvider, }: AuthProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/provider/AuthProvider/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAcH,OAAO,KAAK,EAAE,iBAAiB,EAAyB,MAAM,UAAU,CAAC;AAGzE,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,QAAQ,EACR,cAAc,EACd,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,GAChB,EAAE,iBAAiB,2CA8XnB"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* File: /src/provider/AuthProvider/index.electron.tsx
|
|
3
|
+
* Project: @multiplatform.one/keycloak
|
|
4
|
+
* File Created: 23-01-2025 16:57:16
|
|
5
|
+
* Author: Clay Risser
|
|
6
|
+
* -----
|
|
7
|
+
* BitSpur (c) Copyright 2021 - 2025
|
|
8
|
+
*
|
|
9
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
10
|
+
* you may not use this file except in compliance with the License.
|
|
11
|
+
* You may obtain a copy of the License at
|
|
12
|
+
*
|
|
13
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
14
|
+
*
|
|
15
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
16
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
17
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18
|
+
* See the License for the specific language governing permissions and
|
|
19
|
+
* limitations under the License.
|
|
20
|
+
*/
|
|
21
|
+
import type { AuthProviderProps } from "./shared";
|
|
22
|
+
export declare function AuthProvider({ children, disabled, keycloakConfig, keycloakInitOptions, loadingComponent, }: AuthProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
//# sourceMappingURL=index.electron.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.electron.d.ts","sourceRoot":"","sources":["../../../src/provider/AuthProvider/index.electron.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAaH,OAAO,KAAK,EAAE,iBAAiB,EAAyB,MAAM,UAAU,CAAC;AAGzE,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,QAAQ,EACR,cAAc,EACd,mBAAmB,EACnB,gBAAgB,GACjB,EAAE,iBAAiB,2CAyXnB"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* File: /src/provider/AuthProvider/index.native.tsx
|
|
3
|
+
* Project: @multiplatform.one/keycloak
|
|
4
|
+
* File Created: 19-11-2024 20:26:31
|
|
5
|
+
* Author: Clay Risser
|
|
6
|
+
* -----
|
|
7
|
+
* BitSpur (c) Copyright 2021 - 2024
|
|
8
|
+
*
|
|
9
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
10
|
+
* you may not use this file except in compliance with the License.
|
|
11
|
+
* You may obtain a copy of the License at
|
|
12
|
+
*
|
|
13
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
14
|
+
*
|
|
15
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
16
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
17
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18
|
+
* See the License for the specific language governing permissions and
|
|
19
|
+
* limitations under the License.
|
|
20
|
+
*/
|
|
21
|
+
import type { AuthProviderProps } from "./shared";
|
|
22
|
+
export declare function AuthProvider({ children, disabled, keycloakConfig, loadingComponent, }: AuthProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
//# sourceMappingURL=index.native.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../src/provider/AuthProvider/index.native.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAoBH,OAAO,KAAK,EAAE,iBAAiB,EAAyB,MAAM,UAAU,CAAC;AAIzE,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,QAAQ,EACR,cAAc,EACd,gBAAgB,GACjB,EAAE,iBAAiB,2CAmQnB"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* File: /src/provider/AuthProvider/index.electron.tsx
|
|
3
|
+
* Project: @multiplatform.one/keycloak
|
|
4
|
+
* File Created: 23-01-2025 16:57:16
|
|
5
|
+
* Author: Clay Risser
|
|
6
|
+
* -----
|
|
7
|
+
* BitSpur (c) Copyright 2021 - 2025
|
|
8
|
+
*
|
|
9
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
10
|
+
* you may not use this file except in compliance with the License.
|
|
11
|
+
* You may obtain a copy of the License at
|
|
12
|
+
*
|
|
13
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
14
|
+
*
|
|
15
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
16
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
17
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18
|
+
* See the License for the specific language governing permissions and
|
|
19
|
+
* limitations under the License.
|
|
20
|
+
*/
|
|
21
|
+
import type { AuthProviderProps } from "./shared";
|
|
22
|
+
export declare function AuthProvider({ children, disabled, keycloakConfig, keycloakInitOptions, loadingComponent, }: AuthProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
//# sourceMappingURL=index.webext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.webext.d.ts","sourceRoot":"","sources":["../../../src/provider/AuthProvider/index.webext.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAaH,OAAO,KAAK,EAAE,iBAAiB,EAAyB,MAAM,UAAU,CAAC;AAGzE,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,QAAQ,EACR,cAAc,EACd,mBAAmB,EACnB,gBAAgB,GACjB,EAAE,iBAAiB,2CAyXnB"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* File: /src/provider/AuthProvider/shared.ts
|
|
3
|
+
* Project: @multiplatform.one/keycloak
|
|
4
|
+
* File Created: 23-12-2024 19:30:25
|
|
5
|
+
* Author: Clay Risser
|
|
6
|
+
* -----
|
|
7
|
+
* BitSpur (c) Copyright 2021 - 2024
|
|
8
|
+
*
|
|
9
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
10
|
+
* you may not use this file except in compliance with the License.
|
|
11
|
+
* You may obtain a copy of the License at
|
|
12
|
+
*
|
|
13
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
14
|
+
*
|
|
15
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
16
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
17
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18
|
+
* See the License for the specific language governing permissions and
|
|
19
|
+
* limitations under the License.
|
|
20
|
+
*/
|
|
21
|
+
import type { KeycloakInitOptions } from "keycloak-js";
|
|
22
|
+
import type { SessionProviderProps } from "next-auth/react";
|
|
23
|
+
import type { ComponentType, PropsWithChildren } from "react";
|
|
24
|
+
import type { KeycloakConfig } from "../../keycloak/index";
|
|
25
|
+
export declare const defaultKeycloakInitOptions: KeycloakInitOptions;
|
|
26
|
+
export interface MessageSchema {
|
|
27
|
+
type: string;
|
|
28
|
+
payload?: string;
|
|
29
|
+
}
|
|
30
|
+
export interface AuthProviderProps extends PropsWithChildren {
|
|
31
|
+
disabled?: boolean;
|
|
32
|
+
keycloakConfig: KeycloakConfig;
|
|
33
|
+
keycloakInitOptions?: KeycloakInitOptions;
|
|
34
|
+
loadingComponent?: ComponentType;
|
|
35
|
+
sessionProvider?: Omit<SessionProviderProps, "children">;
|
|
36
|
+
}
|
|
37
|
+
export interface Tokens<B = boolean> {
|
|
38
|
+
idToken?: string | B;
|
|
39
|
+
refreshToken?: string | B;
|
|
40
|
+
token?: string | B;
|
|
41
|
+
}
|
|
42
|
+
export declare enum AuthStrategy {
|
|
43
|
+
AuthJS = "authjs",
|
|
44
|
+
ExpoAuth = "expo-auth",
|
|
45
|
+
KeycloakClientImplicit = "keycloak-client-implicit",
|
|
46
|
+
KeycloakClientStandard = "keycloak-client-standard"
|
|
47
|
+
}
|
|
48
|
+
export declare enum AuthSource {
|
|
49
|
+
Query = "query",
|
|
50
|
+
Session = "session",
|
|
51
|
+
Store = "store"
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=shared.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../src/provider/AuthProvider/shared.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,eAAO,MAAM,0BAA0B,EAAE,mBAMxC,CAAC;AAEF,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,iBAAkB,SAAQ,iBAAiB;IAC1D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,EAAE,cAAc,CAAC;IAC/B,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,gBAAgB,CAAC,EAAE,aAAa,CAAC;IACjC,eAAe,CAAC,EAAE,IAAI,CAAC,oBAAoB,EAAE,UAAU,CAAC,CAAC;CAC1D;AAED,MAAM,WAAW,MAAM,CAAC,CAAC,GAAG,OAAO;IACjC,OAAO,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC;CACpB;AAED,oBAAY,YAAY;IACtB,MAAM,WAAW;IACjB,QAAQ,cAAc;IACtB,sBAAsB,6BAA6B;IACnD,sBAAsB,6BAA6B;CACpD;AAED,oBAAY,UAAU;IACpB,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,KAAK,UAAU;CAChB"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* File: /src/provider/KeycloakProvider.tsx
|
|
3
|
+
* Project: @multiplatform.one/keycloak
|
|
4
|
+
* File Created: 10-01-2024 13:56:05
|
|
5
|
+
* Author: Clay Risser
|
|
6
|
+
* -----
|
|
7
|
+
* BitSpur (c) Copyright 2021 - 2024
|
|
8
|
+
*
|
|
9
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
10
|
+
* you may not use this file except in compliance with the License.
|
|
11
|
+
* You may obtain a copy of the License at
|
|
12
|
+
*
|
|
13
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
14
|
+
*
|
|
15
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
16
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
17
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18
|
+
* See the License for the specific language governing permissions and
|
|
19
|
+
* limitations under the License.
|
|
20
|
+
*/
|
|
21
|
+
import type { PropsWithChildren } from "react";
|
|
22
|
+
import type { AuthConfig } from "../authConfig";
|
|
23
|
+
export interface KeycloakProviderProps extends PropsWithChildren, AuthConfig {
|
|
24
|
+
baseUrl?: string;
|
|
25
|
+
clientId?: string;
|
|
26
|
+
publicClientId?: string;
|
|
27
|
+
realm?: string;
|
|
28
|
+
}
|
|
29
|
+
export declare function KeycloakProvider({ baseUrl, children, clientId, loginRedirectUri, debug, disabled, iframeSso, publicClientId, realm, }: KeycloakProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
//# sourceMappingURL=KeycloakProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KeycloakProvider.d.ts","sourceRoot":"","sources":["../../src/provider/KeycloakProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE/C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAIhD,MAAM,WAAW,qBAAsB,SAAQ,iBAAiB,EAAE,UAAU;IAC1E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,gBAAgB,EAChB,KAAK,EACL,QAAQ,EACR,SAAS,EACT,cAAc,EACd,KAAK,GACN,EAAE,qBAAqB,2CAoBvB"}
|