nexus-shared 1.1.18 → 1.1.19
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/package.json +1 -1
- package/src/client.ts +2 -1
- package/src/components/documents/button.tsx +5 -1
- package/src/components/inputs/input-box.tsx +4 -2
- package/src/components/inputs/input-form.tsx +126 -14
- package/src/helpers/browser-helpers.tsx +41 -1
- package/src/helpers/input-helpers.tsx +34 -4
- package/src/helpers/validation-helpers.tsx +302 -0
- package/src/index.ts +2 -18
- package/src/interface.ts +4 -1
- package/src/interfaces/button-interfaces.tsx +2 -2
- package/src/interfaces/http-interfaces.tsx +89 -8
- package/src/interfaces/input-interfaces.tsx +61 -11
- package/src/interfaces/message-interfaces.tsx +32 -0
- package/src/interfaces/storage-interfaces.tsx +1 -0
- package/src/interfaces/type-interfaces.tsx +8 -2
- package/src/interfaces/user-interfaces.tsx +17 -0
- package/src/nexus.environments.tsx +6 -1
- package/src/proxy-api/proxy-backend.tsx +60 -0
- package/src/proxy-api/proxy-constants.tsx +28 -0
- package/src/proxy-api/proxy-helpers.tsx +91 -0
- package/src/proxy-api-client.tsx +1 -0
- package/src/proxy-api-server.tsx +2 -0
- package/src/services/http-client-services.tsx +26 -11
- package/src/services/http-services.tsx +37 -22
- package/src/services/loader-service.tsx +5 -4
- package/src/services/localstorage-service.tsx +59 -0
- package/src/services/message-services.tsx +383 -0
- package/src/sso-config/auth-token-validation.ts +20 -0
- package/src/sso-config/callback-route.tsx +34 -0
- package/src/sso-config/cookie-encryption.ts +51 -0
- package/src/sso-config/cookie-helpers.tsx +77 -0
- package/src/sso-config/forgot-password-route.tsx +36 -0
- package/src/sso-config/oauth-callback-state.ts +58 -0
- package/src/sso-config/pkce-helpers.ts +16 -0
- package/src/sso-config/provider-complete-route.tsx +15 -0
- package/src/sso-config/redirect-context-actions.tsx +46 -0
- package/src/sso-config/redirect-context-helpers.tsx +144 -0
- package/src/sso-config/redirect-context-persist.tsx +18 -0
- package/src/sso-config/redirect-context-route.tsx +45 -0
- package/src/sso-config/refresh-route.tsx +22 -0
- package/src/sso-config/sign-in-route.tsx +69 -0
- package/src/sso-config/sign-out-route.tsx +53 -0
- package/src/sso-config/sign-up-route.tsx +46 -0
- package/src/sso-config/sso-backend-flow.ts +45 -0
- package/src/sso-config/sso-complete-route.tsx +46 -0
- package/src/sso-config/sso-config.ts +57 -0
- package/src/{interfaces → sso-config}/sso-interfaces.tsx +17 -1
- package/src/sso-config/sso-response-helpers.tsx +20 -0
- package/src/sso-server.tsx +21 -1
- package/src/styles/nexus.dialog.css +3 -0
- package/src/load-env.ts +0 -2
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { IErrorRespose, ISuccessResponse } from "../interfaces/http-interfaces";
|
|
2
|
+
import { ISsoSessionResponse, SSOAuthResponse } from "./sso-interfaces";
|
|
3
|
+
|
|
4
|
+
type ApiResponse = ISuccessResponse | IErrorRespose;
|
|
5
|
+
|
|
6
|
+
export function ParseWrappedResult<T>(response: ApiResponse): T | null {
|
|
7
|
+
if (!response.isSuccess) return null;
|
|
8
|
+
return (response.result ?? null) as T | null;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function ParseSsoCodeResponse(response: ApiResponse): string | null {
|
|
12
|
+
const result = ParseWrappedResult<ISsoSessionResponse | { code?: string }>(response);
|
|
13
|
+
if (!result) return null;
|
|
14
|
+
if ("code" in result && result.code) return result.code;
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export function ParseTokenResponse(response: ApiResponse): SSOAuthResponse | null {
|
|
19
|
+
return ParseWrappedResult<SSOAuthResponse>(response);
|
|
20
|
+
}
|
package/src/sso-server.tsx
CHANGED
|
@@ -1 +1,21 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from "./sso-config/oauth-callback-state";
|
|
2
|
+
export * from "./sso-config/pkce-helpers";
|
|
3
|
+
export * from "./sso-config/sso-backend-flow";
|
|
4
|
+
export * from "./sso-config/auth-token-validation";
|
|
5
|
+
export * from "./sso-config/callback-route";
|
|
6
|
+
export * from "./sso-config/cookie-helpers";
|
|
7
|
+
export * from "./sso-config/redirect-context-actions";
|
|
8
|
+
export * from "./sso-config/redirect-context-helpers";
|
|
9
|
+
export * from "./sso-config/redirect-context-route";
|
|
10
|
+
export * from "./sso-config/redirect-context-persist";
|
|
11
|
+
export * from "./sso-config/refresh-route";
|
|
12
|
+
export * from "./sso-config/sign-in-route";
|
|
13
|
+
export * from "./sso-config/sign-out-route";
|
|
14
|
+
export * from "./sso-config/sign-up-route";
|
|
15
|
+
export * from "./sso-config/sso-response-helpers";
|
|
16
|
+
export * from "./sso-config/forgot-password-route";
|
|
17
|
+
export * from "./sso-config/provider-complete-route";
|
|
18
|
+
export * from "./sso-config/sso-complete-route";
|
|
19
|
+
export * from "./sso-config/sso-config";
|
|
20
|
+
export * from "./sso-config/sso-interfaces";
|
|
21
|
+
export * from "./sso-config/sso-response-helpers";
|
package/src/load-env.ts
DELETED