@authing/guard-shim-react 4.5.13 → 4.5.14-alpha.1
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/guard.min.css +1 -1
- package/dist/guard.min.js +1156 -1162
- package/dist/typings/src/Guard/core/hooks/useMultipleAccounts.d.ts +1 -1
- package/dist/typings/src/MFA/businessRequest.d.ts +33 -12
- package/dist/typings/src/MFA/core/passkey.d.ts +14 -0
- package/dist/typings/src/MFA/interface.d.ts +2 -1
- package/dist/typings/src/Qrcode/UiQrCode.d.ts +1 -2
- package/dist/typings/src/Qrcode/WorkQrCode.d.ts +2 -5
- package/dist/typings/src/Qrcode/hooks/usePostQrCode.d.ts +0 -1
- package/dist/typings/src/Qrcode/hooks/usePreQrCode.d.ts +0 -8
- package/dist/typings/src/Qrcode/index.d.ts +3 -7
- package/dist/typings/src/Type/application.d.ts +1 -15
- package/dist/typings/src/_utils/context.d.ts +4 -2
- package/dist/typings/src/_utils/passkey.d.ts +3 -0
- package/package.json +1 -1
- package/dist/typings/src/Login/core/withZjQrcode.d.ts +0 -11
|
@@ -13,7 +13,7 @@ export declare const QR_CODE_WAY: LoginWay[];
|
|
|
13
13
|
* 登录时所有支持的登录列表(前端定义列表)
|
|
14
14
|
* 这里稍微有点乱 因为Login中的登录方式和这里的不匹配,暂时放在了一起
|
|
15
15
|
*/
|
|
16
|
-
export declare type LoginWay = 'email' | 'phone' | 'password' | 'phone-code' | 'email-code' | 'social' | 'wechat-miniprogram-qrcode' | 'wechatmp-qrcode' | 'app-qrcode' | '
|
|
16
|
+
export declare type LoginWay = 'email' | 'phone' | 'password' | 'phone-code' | 'email-code' | 'social' | 'wechat-miniprogram-qrcode' | 'wechatmp-qrcode' | 'app-qrcode' | 'ad' | 'ldap' | 'ldap-password' | 'ldap-email' | 'ldap-phone' | 'authing-otp-push';
|
|
17
17
|
/**
|
|
18
18
|
* when: 多账号页面跳转进入登录页面
|
|
19
19
|
* 携带的回填数据信息
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
+
import { CredentialCreationOptionsJSON, CredentialRequestOptionsJSON, PublicKeyCredentialWithAssertionJSON, PublicKeyCredentialWithAttestationJSON } from '@github/webauthn-json';
|
|
2
|
+
import { AuthingGuardResponse } from '../_utils/http';
|
|
1
3
|
export declare enum MfaBusinessAction {
|
|
2
4
|
VerifyEmail = "verify-email",
|
|
3
5
|
VerifySms = "verify-sms",
|
|
4
6
|
VerifyTotp = "verify-totp",
|
|
5
7
|
VerifyFace = "verify-face",
|
|
6
|
-
AssociateFace = "associate-face"
|
|
8
|
+
AssociateFace = "associate-face",
|
|
9
|
+
PasskeyBind = "passkey-bind",
|
|
10
|
+
PasskeyVerify = "passkey-verify"
|
|
7
11
|
}
|
|
8
|
-
export declare const authFlow: (action: MfaBusinessAction, content: any) => Promise<
|
|
12
|
+
export declare const authFlow: (action: MfaBusinessAction, content: any) => Promise<AuthingGuardResponse<any>>;
|
|
9
13
|
interface VerifySmsContent {
|
|
10
14
|
phone: string;
|
|
11
15
|
code: string;
|
|
@@ -31,16 +35,33 @@ interface AssociateFaceContent {
|
|
|
31
35
|
isExternalPhoto?: boolean;
|
|
32
36
|
mfaToken?: string;
|
|
33
37
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
38
|
+
declare type BindPasskeyContent = PublicKeyCredentialWithAttestationJSON;
|
|
39
|
+
interface VerifyPasskeyContent {
|
|
40
|
+
credential: PublicKeyCredentialWithAssertionJSON;
|
|
41
|
+
ticket: string;
|
|
42
|
+
}
|
|
43
|
+
interface GetPasskeyBindChallengeParams {
|
|
44
|
+
mfaToken: string;
|
|
45
|
+
}
|
|
46
|
+
interface GetPasskeyVerifyChallengeParams {
|
|
47
|
+
mfaToken: string;
|
|
48
|
+
}
|
|
49
|
+
export declare const VerifyEmail: (content: VerifyEmailContent) => Promise<AuthingGuardResponse<any>>;
|
|
50
|
+
export declare const VerifySms: (content: VerifySmsContent) => Promise<AuthingGuardResponse<any>>;
|
|
51
|
+
export declare const VerifyTotp: (content: VerifyTotpContent) => Promise<AuthingGuardResponse<any>>;
|
|
52
|
+
export declare const VerifyFace: (content: VerifyFaceContent) => Promise<AuthingGuardResponse<any>>;
|
|
53
|
+
export declare const AssociateFace: (content: AssociateFaceContent) => Promise<AuthingGuardResponse<any>>;
|
|
54
|
+
export declare const GetPasskeyBindChallenge: (content: GetPasskeyBindChallengeParams) => Promise<AuthingGuardResponse<CredentialCreationOptionsJSON>>;
|
|
55
|
+
export declare const GetPasskeyVerifyChallenge: (content: GetPasskeyVerifyChallengeParams) => Promise<AuthingGuardResponse<CredentialRequestOptionsJSON & {
|
|
56
|
+
ticket: string;
|
|
57
|
+
}>>;
|
|
39
58
|
export declare const useMfaBusinessRequest: () => {
|
|
40
|
-
"verify-email": (content: VerifyEmailContent) => Promise<
|
|
41
|
-
"verify-sms": (content: VerifySmsContent) => Promise<
|
|
42
|
-
"verify-totp": (content: VerifyTotpContent) => Promise<
|
|
43
|
-
"verify-face": (content: VerifyFaceContent) => Promise<
|
|
44
|
-
"associate-face": (content: AssociateFaceContent) => Promise<
|
|
59
|
+
"verify-email": (content: VerifyEmailContent) => Promise<AuthingGuardResponse<any>>;
|
|
60
|
+
"verify-sms": (content: VerifySmsContent) => Promise<AuthingGuardResponse<any>>;
|
|
61
|
+
"verify-totp": (content: VerifyTotpContent) => Promise<AuthingGuardResponse<any>>;
|
|
62
|
+
"verify-face": (content: VerifyFaceContent) => Promise<AuthingGuardResponse<any>>;
|
|
63
|
+
"associate-face": (content: AssociateFaceContent) => Promise<AuthingGuardResponse<any>>;
|
|
64
|
+
"passkey-bind": (content: BindPasskeyContent) => Promise<AuthingGuardResponse<any>> | null;
|
|
65
|
+
"passkey-verify": (content: VerifyPasskeyContent) => Promise<AuthingGuardResponse<any>> | null;
|
|
45
66
|
};
|
|
46
67
|
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { React } from 'shim-react';
|
|
2
|
+
interface BindPasskeyProps {
|
|
3
|
+
mfaToken: string;
|
|
4
|
+
mfaLogin: (code: any, data: any, message?: string) => void;
|
|
5
|
+
}
|
|
6
|
+
interface VerifyPasskeyProps {
|
|
7
|
+
mfaToken: string;
|
|
8
|
+
mfaLogin: (code: any, data: any, message?: string) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare type MFAPasskeyProps = BindPasskeyProps & VerifyPasskeyProps & {
|
|
11
|
+
passkeyEnabled: boolean;
|
|
12
|
+
};
|
|
13
|
+
export declare const MFAPasskey: React.FC<MFAPasskeyProps>;
|
|
14
|
+
export {};
|
|
@@ -15,7 +15,7 @@ interface WorkQrCodeProps extends Omit<UiQrProps, 'description' | 'status'> {
|
|
|
15
15
|
/**
|
|
16
16
|
* 二维码场景
|
|
17
17
|
*/
|
|
18
|
-
scene: 'WXAPP_AUTH' | 'APP_AUTH' | 'WECHATMP_AUTH'
|
|
18
|
+
scene: 'WXAPP_AUTH' | 'APP_AUTH' | 'WECHATMP_AUTH';
|
|
19
19
|
/**
|
|
20
20
|
* 不同状态请求文字
|
|
21
21
|
*/
|
|
@@ -38,7 +38,4 @@ interface WorkQrCodeProps extends Omit<UiQrProps, 'description' | 'status'> {
|
|
|
38
38
|
qrCodeScanOptions?: any;
|
|
39
39
|
}
|
|
40
40
|
declare const WorkQrCode: React.ForwardRefExoticComponent<WorkQrCodeProps & React.RefAttributes<any>>;
|
|
41
|
-
|
|
42
|
-
authorizationUrl?: string | undefined;
|
|
43
|
-
} & React.RefAttributes<any>>;
|
|
44
|
-
export { WorkQrCode, WorkGeneQrCode };
|
|
41
|
+
export { WorkQrCode };
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
import { UiQrCode
|
|
2
|
-
import { WorkQrCode
|
|
1
|
+
import { UiQrCode } from './UiQrCode';
|
|
2
|
+
import { WorkQrCode } from './WorkQrCode';
|
|
3
3
|
declare type IQrCode = typeof WorkQrCode & {
|
|
4
4
|
UI: typeof UiQrCode;
|
|
5
5
|
};
|
|
6
|
-
declare type IGeneQrCode = typeof WorkGeneQrCode & {
|
|
7
|
-
UI: typeof LinkQrcode;
|
|
8
|
-
};
|
|
9
6
|
declare const QrCode: IQrCode;
|
|
10
|
-
|
|
11
|
-
export { QrCode, GeneQrcode };
|
|
7
|
+
export { QrCode };
|
|
@@ -14,8 +14,7 @@ export declare enum LoginMethods {
|
|
|
14
14
|
AuthingOtpPush = "authing-otp-push",
|
|
15
15
|
WechatworkCorpQrconnect = "wechatwork-corp-qrconnect",
|
|
16
16
|
DingTalkQrcode = "dingtalk-qrcode",
|
|
17
|
-
Passkey = "passkey"
|
|
18
|
-
ZJZWFWQrcode = "zjzwfw-qrcode"
|
|
17
|
+
Passkey = "passkey"
|
|
19
18
|
}
|
|
20
19
|
export declare enum OIDCConnectionMode {
|
|
21
20
|
FRONT_CHANNEL = "FRONT_CHANNEL",
|
|
@@ -127,7 +126,6 @@ export interface QrCodeItem {
|
|
|
127
126
|
redirectUrl: string;
|
|
128
127
|
identifier: string;
|
|
129
128
|
clientId?: string;
|
|
130
|
-
authorizationUrl?: string;
|
|
131
129
|
};
|
|
132
130
|
}
|
|
133
131
|
export declare type QrcodeTabsSettings = Record<LoginMethods, Array<QrCodeItem>>;
|
|
@@ -365,16 +363,4 @@ export interface ApplicationConfig {
|
|
|
365
363
|
mfa: MFAType;
|
|
366
364
|
changeable: boolean;
|
|
367
365
|
}[];
|
|
368
|
-
/** 注册阶段短信安全配置 */
|
|
369
|
-
registerSmsConfig?: {
|
|
370
|
-
robot: {
|
|
371
|
-
switch: 'OFF' | 'ON' | 'CONDON';
|
|
372
|
-
};
|
|
373
|
-
};
|
|
374
|
-
/** 登录阶段短信安全配置 */
|
|
375
|
-
loginSmsConfig?: {
|
|
376
|
-
robot: {
|
|
377
|
-
switch: 'OFF' | 'ON' | 'CONDON';
|
|
378
|
-
};
|
|
379
|
-
};
|
|
380
366
|
}
|
|
@@ -49,6 +49,8 @@ export interface IGuardContext {
|
|
|
49
49
|
defaultLanguageConfig: Lang;
|
|
50
50
|
/** 租户信息获取和操作处理相关 */
|
|
51
51
|
tenantInstance?: MultipleTenant;
|
|
52
|
+
/** 判断是否是国外的用户池 */
|
|
53
|
+
isForeignUserpool: boolean;
|
|
52
54
|
}
|
|
53
55
|
export declare const createGuardXContext: () => {
|
|
54
56
|
Provider: React.FC<{
|
|
@@ -160,5 +162,5 @@ export declare const useGuardDefaultLanguage: () => Lang;
|
|
|
160
162
|
export declare const useGuardTenantProvider: () => MultipleTenant | undefined;
|
|
161
163
|
/** 当前人机验证策略 */
|
|
162
164
|
export declare const useRobotVerify: () => "always_enable" | "disable" | "condition_set";
|
|
163
|
-
/**
|
|
164
|
-
export declare const
|
|
165
|
+
/** 当前用户池是否是国外用户池 */
|
|
166
|
+
export declare const useIsForeignUserpool: () => boolean;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { CredentialCreationOptionsJSON, CredentialRequestOptionsJSON } from '@github/webauthn-json';
|
|
2
|
+
export declare const registerPasskey: (challenge: CredentialCreationOptionsJSON) => Promise<import("@github/webauthn-json").PublicKeyCredentialWithAttestationJSON | undefined>;
|
|
3
|
+
export declare const verifyPasskey: (challenge: CredentialRequestOptionsJSON) => Promise<import("@github/webauthn-json").PublicKeyCredentialWithAssertionJSON | undefined>;
|
package/package.json
CHANGED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { StoreInstance } from '../../Guard/core/hooks/useMultipleAccounts';
|
|
2
|
-
import { QrCodeItem } from '../..';
|
|
3
|
-
interface LoginWithAppQrcodeProps {
|
|
4
|
-
onLoginSuccess: any;
|
|
5
|
-
canLoop: boolean;
|
|
6
|
-
multipleInstance?: StoreInstance;
|
|
7
|
-
qrConfig: QrCodeItem['QRConfig'];
|
|
8
|
-
qrCodeScanOptions: any;
|
|
9
|
-
}
|
|
10
|
-
export declare const LoginWithZjQrcode: (props: LoginWithAppQrcodeProps) => JSX.Element | null;
|
|
11
|
-
export {};
|