@authing/guard-shim-react 4.5.47-bg.2 → 4.5.47-bg.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.
|
@@ -62,7 +62,7 @@ declare function useLoginSelectAccount(setLoginWay: React.Dispatch<any>): {
|
|
|
62
62
|
getOriginAccount: () => string;
|
|
63
63
|
getOriginWay: () => string;
|
|
64
64
|
} | undefined;
|
|
65
|
-
referMultipleState: ((type: "
|
|
65
|
+
referMultipleState: ((type: "multiple" | "login") => void) | undefined;
|
|
66
66
|
backfillData: BackFillMultipleState | undefined;
|
|
67
67
|
defaultQrWay: string | undefined;
|
|
68
68
|
};
|
|
@@ -7,7 +7,10 @@ export declare enum MfaBusinessAction {
|
|
|
7
7
|
VerifyFace = "verify-face",
|
|
8
8
|
AssociateFace = "associate-face",
|
|
9
9
|
PasskeyBind = "passkey-bind",
|
|
10
|
-
PasskeyVerify = "passkey-verify"
|
|
10
|
+
PasskeyVerify = "passkey-verify",
|
|
11
|
+
GetFaceLivenessSession = "get-face-liveness-session",
|
|
12
|
+
GetFaceLivenessResult = "get-face-liveness-result",
|
|
13
|
+
VerifyFaceLiveness = "verify-face-liveness"
|
|
11
14
|
}
|
|
12
15
|
export declare const authFlow: (action: MfaBusinessAction, content: any) => Promise<AuthingGuardResponse<any>>;
|
|
13
16
|
interface VerifySmsContent {
|
|
@@ -35,6 +38,13 @@ interface AssociateFaceContent {
|
|
|
35
38
|
isExternalPhoto?: boolean;
|
|
36
39
|
mfaToken?: string;
|
|
37
40
|
}
|
|
41
|
+
interface GetFaceLivenessSessionContent {
|
|
42
|
+
mfaToken?: string;
|
|
43
|
+
}
|
|
44
|
+
interface GetFaceLivenessResultContent {
|
|
45
|
+
sessionId: string;
|
|
46
|
+
mfaToken?: string;
|
|
47
|
+
}
|
|
38
48
|
type BindPasskeyContent = PublicKeyCredentialWithAttestationJSON & {
|
|
39
49
|
mfaToken?: string;
|
|
40
50
|
};
|
|
@@ -54,6 +64,22 @@ export declare const VerifySms: (content: VerifySmsContent) => Promise<AuthingGu
|
|
|
54
64
|
export declare const VerifyTotp: (content: VerifyTotpContent) => Promise<AuthingGuardResponse<any>>;
|
|
55
65
|
export declare const VerifyFace: (content: VerifyFaceContent) => Promise<AuthingGuardResponse<any>>;
|
|
56
66
|
export declare const AssociateFace: (content: AssociateFaceContent) => Promise<AuthingGuardResponse<any>>;
|
|
67
|
+
/**
|
|
68
|
+
* 获取 AWS 活体检测 Session
|
|
69
|
+
* POST /api/v2/mfa/face/liveness/session
|
|
70
|
+
*/
|
|
71
|
+
export declare const GetFaceLivenessSession: (content: GetFaceLivenessSessionContent) => Promise<AuthingGuardResponse<any>>;
|
|
72
|
+
/**
|
|
73
|
+
* 获取 AWS 活体检测结果
|
|
74
|
+
* GET /api/v2/mfa/face/liveness/result?sessionId=xxx
|
|
75
|
+
*/
|
|
76
|
+
export declare const GetFaceLivenessResult: (content: GetFaceLivenessResultContent) => Promise<AuthingGuardResponse<any>>;
|
|
77
|
+
/**
|
|
78
|
+
* AWS 临时凭证接口(占位)
|
|
79
|
+
* GET /api/credentials
|
|
80
|
+
* TODO: 后端需要实现此接口
|
|
81
|
+
*/
|
|
82
|
+
export declare const GetAwsCredentials: () => Promise<AuthingGuardResponse<any>>;
|
|
57
83
|
export declare const GetPasskeyBindChallenge: (content: GetPasskeyBindChallengeParams) => Promise<AuthingGuardResponse<CredentialCreationOptionsJSON>>;
|
|
58
84
|
export declare const GetPasskeyVerifyChallenge: (content: GetPasskeyVerifyChallengeParams) => Promise<AuthingGuardResponse<CredentialRequestOptionsJSON & {
|
|
59
85
|
ticket: string;
|
|
@@ -66,5 +92,7 @@ export declare const useMfaBusinessRequest: () => {
|
|
|
66
92
|
"associate-face": (content: AssociateFaceContent) => Promise<AuthingGuardResponse<any>>;
|
|
67
93
|
"passkey-bind": (content: BindPasskeyContent) => Promise<AuthingGuardResponse<any>> | null;
|
|
68
94
|
"passkey-verify": (content: VerifyPasskeyContent) => Promise<AuthingGuardResponse<any>> | null;
|
|
95
|
+
"get-face-liveness-session": (content: GetFaceLivenessSessionContent) => Promise<AuthingGuardResponse<any>>;
|
|
96
|
+
"get-face-liveness-result": (content: GetFaceLivenessResultContent) => Promise<AuthingGuardResponse<any>>;
|
|
69
97
|
};
|
|
70
98
|
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import '@aws-amplify/ui-react/styles.css';
|
|
3
|
+
interface AwsFaceLivenessDetectorProps {
|
|
4
|
+
sessionId: string;
|
|
5
|
+
region?: string;
|
|
6
|
+
onAnalysisComplete?: () => void | Promise<void>;
|
|
7
|
+
onError?: (error: any) => void;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* AWS Face Liveness 检测组件
|
|
11
|
+
* 使用 Cognito 获取临时 AWS 凭证,避免在前端暴露永久凭证
|
|
12
|
+
*/
|
|
13
|
+
export declare const AwsFaceLivenessDetector: React.FC<AwsFaceLivenessDetectorProps>;
|
|
14
|
+
export default AwsFaceLivenessDetector;
|
package/package.json
CHANGED