@nibssplc/cams-sdk-react 1.0.0-rc.62 → 1.0.0-rc.63
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/components/ADLoginModal.d.ts +1 -0
- package/dist/components/CoreFIDO.d.ts +1 -9
- package/dist/components/DefaultLoginPage.d.ts +2 -1
- package/dist/context/CAMSContext.d.ts +2 -2
- package/dist/hooks/useCAMSMSALAuth.d.ts +3 -4
- package/dist/hooks/useOTPHandler.d.ts +7 -8
- package/dist/index.cjs.js +147 -299
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +149 -301
- package/dist/index.esm.js.map +1 -1
- package/package.json +2 -2
- package/dist/lib/actions/Axiosinstance.d.ts +0 -1
- package/dist/utils/DeviceID.d.ts +0 -4
|
@@ -1,12 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
id: string;
|
|
3
|
-
rawId: string;
|
|
4
|
-
type: string;
|
|
5
|
-
response: {
|
|
6
|
-
clientDataJSON: string;
|
|
7
|
-
attestationObject: string;
|
|
8
|
-
};
|
|
9
|
-
}
|
|
1
|
+
import { AttestationResult } from "@nibssplc/cams-sdk";
|
|
10
2
|
/**
|
|
11
3
|
* Initiates the WebAuthn registration process.
|
|
12
4
|
* It takes server-provided options, converts them for the browser API,
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { MFAEndpoints } from "./MFAGate";
|
|
2
2
|
interface LoginPageProps {
|
|
3
|
+
username?: string;
|
|
3
4
|
usePassKey?: boolean;
|
|
4
5
|
CredentialsAuthEndpoint?: string;
|
|
5
6
|
useADLogin?: boolean;
|
|
6
7
|
MFAEndpoints: MFAEndpoints;
|
|
7
8
|
PassKeysRegisterProps?: Record<string, unknown>;
|
|
8
9
|
}
|
|
9
|
-
declare const DefaultLoginPage: ({ usePassKey, useADLogin, MFAEndpoints, CredentialsAuthEndpoint, PassKeysRegisterProps, }: LoginPageProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare const DefaultLoginPage: ({ username, usePassKey, useADLogin, MFAEndpoints, CredentialsAuthEndpoint, PassKeysRegisterProps, }: LoginPageProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
11
|
export default DefaultLoginPage;
|
|
@@ -3,8 +3,8 @@ import { UseCAMSAuthReturn } from "../hooks/useCAMSAuth";
|
|
|
3
3
|
import { UseCAMSMSALAuthReturn } from "../hooks/useCAMSMSALAuth";
|
|
4
4
|
type AuthMode = "REGULAR" | "MSAL";
|
|
5
5
|
interface BaseCAMSContextValue {
|
|
6
|
-
|
|
7
|
-
setUserProfile: (
|
|
6
|
+
user: Profile | null;
|
|
7
|
+
setUserProfile: (user: Profile | null) => void;
|
|
8
8
|
authMode: AuthMode;
|
|
9
9
|
}
|
|
10
10
|
interface RegularCAMSContextValue extends BaseCAMSContextValue, UseCAMSAuthReturn {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../utils/crypto-polyfill";
|
|
2
|
-
import { CAMSError,
|
|
2
|
+
import { CAMSError, MFAAuthenticatedResponse } from "@nibssplc/cams-sdk";
|
|
3
3
|
export interface UseCAMSMSALAuthOptions {
|
|
4
4
|
onTokenExpired?: () => void;
|
|
5
5
|
scopes?: string[];
|
|
@@ -21,11 +21,10 @@ export interface UseCAMSMSALAuthReturn {
|
|
|
21
21
|
idToken: string;
|
|
22
22
|
accessToken: string;
|
|
23
23
|
appCode: string;
|
|
24
|
-
mfaAuthenticator: CAMSMFAAuthenticator | null;
|
|
25
24
|
requiresMFA: boolean;
|
|
26
|
-
completeMFA: (data:
|
|
25
|
+
completeMFA: (data: MFAAuthenticatedResponse) => Promise<MFAAuthenticatedResponse>;
|
|
27
26
|
setRequiresMFA: React.Dispatch<React.SetStateAction<boolean>>;
|
|
28
|
-
|
|
27
|
+
LoginADCredentials: () => Promise<MFAAuthenticatedResponse>;
|
|
29
28
|
activeCookiePeriod: number;
|
|
30
29
|
}
|
|
31
30
|
export declare function useCAMSMSALAuth(options: UseCAMSMSALAuthOptions): UseCAMSMSALAuthReturn;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
idToken: string;
|
|
1
|
+
import { type Credentials, MFAAuthenticatedResponse } from "@nibssplc/cams-sdk";
|
|
2
|
+
export declare const useOTPHandler: ({ email, appCode, instCode, MFAEndpoint, onAuthComplete, }: {
|
|
3
|
+
email: string;
|
|
5
4
|
appCode: string;
|
|
6
|
-
|
|
5
|
+
instCode?: string;
|
|
7
6
|
MFAEndpoint?: string;
|
|
8
|
-
onAuthComplete: (state: boolean, data:
|
|
7
|
+
onAuthComplete: (state: boolean, data: MFAAuthenticatedResponse | null) => void;
|
|
9
8
|
}) => {
|
|
10
9
|
handleSubmitOTP: (authenticationValue: string) => Promise<boolean>;
|
|
11
10
|
loading: boolean;
|
|
@@ -15,8 +14,8 @@ export declare const useOTPHandler: ({ provider, accessToken, idToken, appCode,
|
|
|
15
14
|
resetAttempts: () => void;
|
|
16
15
|
remainingAttempts: number;
|
|
17
16
|
};
|
|
18
|
-
export declare const useCredentialsHandler: (onAuthComplete: (state: boolean, data:
|
|
19
|
-
handleSubmitCredentials: (
|
|
17
|
+
export declare const useCredentialsHandler: (onAuthComplete: (state: boolean, data: MFAAuthenticatedResponse | null) => void) => {
|
|
18
|
+
handleSubmitCredentials: (CredentialsAuthEndpoint: string, credentials: Credentials, appCode: string) => Promise<boolean>;
|
|
20
19
|
loading: boolean;
|
|
21
20
|
setLoading: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
22
21
|
attemptCount: number;
|