@authing/guard-shim-react 4.5.46-alpha.8 → 4.5.46-carzon.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.js +321 -323
- package/dist/typings/src/Login/hooks/useLoginMultiple.d.ts +2 -2
- package/dist/typings/src/Type/application.d.ts +12 -0
- package/dist/typings/src/_utils/config/index.d.ts +1 -1
- package/dist/typings/src/_utils/context.d.ts +13 -3
- 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
|
@@ -39,7 +39,7 @@ declare function useLoginSelectAccount(setLoginWay: React.Dispatch<any>): {
|
|
|
39
39
|
id: string;
|
|
40
40
|
loginAccount?: string | undefined;
|
|
41
41
|
usertype?: string | undefined;
|
|
42
|
-
}, "
|
|
42
|
+
}, "tab" | "way" | "phoneCountryCode">) => void;
|
|
43
43
|
setLoginWayByHttpData: (account: string, data: {
|
|
44
44
|
username?: string | undefined;
|
|
45
45
|
phone?: string | undefined;
|
|
@@ -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,12 +388,20 @@ 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
|
};
|
|
398
406
|
/** 特殊浏览器匹配字符串 */
|
|
399
407
|
specialBrowserSymbols?: string[];
|
|
@@ -411,4 +419,8 @@ export interface ApplicationConfig {
|
|
|
411
419
|
title: I18nLang;
|
|
412
420
|
desc: I18nLang;
|
|
413
421
|
};
|
|
422
|
+
robotVerifyService?: {
|
|
423
|
+
type: 'Authing' | 'Tencent';
|
|
424
|
+
appId: string;
|
|
425
|
+
};
|
|
414
426
|
}
|
|
@@ -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?: "
|
|
57
|
+
socialConnectionsBtnShape?: "button" | "icon" | "default" | undefined;
|
|
58
58
|
enterpriseConnections?: string[] | undefined;
|
|
59
59
|
qrCodeScanOptions?: {
|
|
60
60
|
extIdpConnId?: string | undefined;
|
|
@@ -123,7 +123,7 @@ export declare const useGuardAccountSelectInstance: () => {
|
|
|
123
123
|
id: string;
|
|
124
124
|
loginAccount?: string | undefined;
|
|
125
125
|
usertype?: string | undefined;
|
|
126
|
-
}, "
|
|
126
|
+
}, "tab" | "way" | "phoneCountryCode">) => void;
|
|
127
127
|
setLoginWayByHttpData: (account: string, data: {
|
|
128
128
|
username?: string | undefined;
|
|
129
129
|
phone?: 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') =>
|
|
173
|
+
export declare const useCaptchaCheck: (sence: 'login' | 'register') => {
|
|
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