@authing/guard-shim-react 4.5.46-alpha.9 → 4.5.46-carzon.2
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.js +330 -323
- package/dist/typings/src/Login/hooks/useLoginMultiple.d.ts +1 -1
- package/dist/typings/src/Type/application.d.ts +17 -0
- package/dist/typings/src/_utils/config/index.d.ts +1 -1
- package/dist/typings/src/_utils/context.d.ts +12 -2
- package/dist/typings/src/_utils/hooks/index.d.ts +1 -0
- package/dist/typings/src/_utils/hooks/useTencentCaptcha.d.ts +18 -0
- package/package.json +1 -1
|
@@ -61,7 +61,7 @@ declare function useLoginSelectAccount(setLoginWay: React.Dispatch<any>): {
|
|
|
61
61
|
getOriginAccount: () => string;
|
|
62
62
|
getOriginWay: () => string;
|
|
63
63
|
} | undefined;
|
|
64
|
-
referMultipleState: ((type: "
|
|
64
|
+
referMultipleState: ((type: "multiple" | "login") => void) | undefined;
|
|
65
65
|
backfillData: BackFillMultipleState | undefined;
|
|
66
66
|
defaultQrWay: string | undefined;
|
|
67
67
|
};
|
|
@@ -388,17 +388,30 @@ export interface ApplicationConfig {
|
|
|
388
388
|
robot: {
|
|
389
389
|
switch: 'OFF' | 'ON' | 'CONDON';
|
|
390
390
|
};
|
|
391
|
+
robotVerifyService: {
|
|
392
|
+
type: 'Authing' | 'Tencent';
|
|
393
|
+
appId: string;
|
|
394
|
+
};
|
|
391
395
|
};
|
|
392
396
|
/** 登录阶段短信安全配置 */
|
|
393
397
|
loginSmsConfig?: {
|
|
394
398
|
robot: {
|
|
395
399
|
switch: 'OFF' | 'ON' | 'CONDON';
|
|
396
400
|
};
|
|
401
|
+
robotVerifyService: {
|
|
402
|
+
type: 'Authing' | 'Tencent';
|
|
403
|
+
appId: string;
|
|
404
|
+
};
|
|
397
405
|
};
|
|
406
|
+
/** 忘记密码阶段短信安全配置 */
|
|
398
407
|
forgetPasswordSmsConfig?: {
|
|
399
408
|
robot: {
|
|
400
409
|
switch: 'OFF' | 'ON' | 'CONDON';
|
|
401
410
|
};
|
|
411
|
+
robotVerifyService: {
|
|
412
|
+
type: 'Authing' | 'Tencent';
|
|
413
|
+
appId: string;
|
|
414
|
+
};
|
|
402
415
|
};
|
|
403
416
|
/** 特殊浏览器匹配字符串 */
|
|
404
417
|
specialBrowserSymbols?: string[];
|
|
@@ -416,4 +429,8 @@ export interface ApplicationConfig {
|
|
|
416
429
|
title: I18nLang;
|
|
417
430
|
desc: I18nLang;
|
|
418
431
|
};
|
|
432
|
+
robotVerifyService?: {
|
|
433
|
+
type: 'Authing' | 'Tencent';
|
|
434
|
+
appId: string;
|
|
435
|
+
};
|
|
419
436
|
}
|
|
@@ -54,7 +54,7 @@ export declare const useFetchConsoleConfig: (forceUpdate: number, appId?: string
|
|
|
54
54
|
loginMethods?: LoginMethods[] | undefined;
|
|
55
55
|
passwordLoginMethods?: string[] | undefined;
|
|
56
56
|
socialConnections?: import("../../Type").SocialConnectionProvider[] | undefined;
|
|
57
|
-
socialConnectionsBtnShape?: "button" | "
|
|
57
|
+
socialConnectionsBtnShape?: "button" | "icon" | "default" | undefined;
|
|
58
58
|
enterpriseConnections?: string[] | undefined;
|
|
59
59
|
qrCodeScanOptions?: {
|
|
60
60
|
extIdpConnId?: string | undefined;
|
|
@@ -162,6 +162,16 @@ export declare const useGuardDefaultLanguage: () => Lang;
|
|
|
162
162
|
/** 用来操作和获取租户相关的内容 */
|
|
163
163
|
export declare const useGuardTenantProvider: () => MultipleTenant | undefined;
|
|
164
164
|
/** 当前人机验证策略 */
|
|
165
|
-
export declare const useRobotVerify: () =>
|
|
165
|
+
export declare const useRobotVerify: () => {
|
|
166
|
+
robotVerify: "always_enable" | "disable" | "condition_set";
|
|
167
|
+
robotVerifyService: {
|
|
168
|
+
type: "Authing" | "Tencent";
|
|
169
|
+
appId: string;
|
|
170
|
+
} | undefined;
|
|
171
|
+
};
|
|
166
172
|
/** 当前应用是否开启人机验证策略 */
|
|
167
|
-
export declare const useCaptchaCheck: (sence: 'login' | 'register' | 'forget-password') =>
|
|
173
|
+
export declare const useCaptchaCheck: (sence: 'login' | 'register' | 'forget-password') => {
|
|
174
|
+
captchaCheck: boolean;
|
|
175
|
+
type: string;
|
|
176
|
+
appId: string;
|
|
177
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const TENCENT_CAPTCHA_CANCELLED = "tencent_captcha_cancelled";
|
|
2
|
+
export interface TencentCaptchaResult {
|
|
3
|
+
ticket: string;
|
|
4
|
+
randstr: string;
|
|
5
|
+
}
|
|
6
|
+
interface UseTencentCaptchaOptions {
|
|
7
|
+
enabled?: boolean;
|
|
8
|
+
appId?: string;
|
|
9
|
+
form?: any;
|
|
10
|
+
userLanguage?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const useTencentCaptcha: ({ enabled, appId, form, userLanguage }: UseTencentCaptchaOptions) => {
|
|
13
|
+
loadTencentCaptchaScript: () => Promise<void>;
|
|
14
|
+
runTencentCaptcha: () => Promise<TencentCaptchaResult>;
|
|
15
|
+
setTencentCaptchaFields: () => Promise<TencentCaptchaResult>;
|
|
16
|
+
resetTencentCaptchaFields: () => void;
|
|
17
|
+
};
|
|
18
|
+
export {};
|
package/package.json
CHANGED