@authing/guard-shim-react 4.5.53 → 4.5.54-shjw.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 +1258 -1253
- package/dist/typings/src/Login/core/withPassword/GraphicVerifyCode.d.ts +6 -0
- package/dist/typings/src/Login/core/withVerifyCode/FormItemIdentify.d.ts +1 -0
- package/dist/typings/src/SendCode/SendCodeByEmail.d.ts +1 -0
- package/dist/typings/src/SendCode/SendCodeByPhone.d.ts +1 -0
- package/dist/typings/src/SendCode/captchaPolicy.d.ts +2 -0
- package/dist/typings/src/Type/application.d.ts +3 -3
- package/dist/typings/src/ValidatorRules/findUserWithCaptcha.d.ts +4 -0
- package/dist/typings/src/ValidatorRules/index.d.ts +2 -0
- package/dist/typings/src/ValidatorRules/sentAccountCheck.d.ts +5 -0
- package/dist/typings/src/ValidatorRules/useCheckRepeat.d.ts +1 -1
- package/dist/typings/src/ValidatorRules/useFindUser.d.ts +4 -0
- package/dist/typings/src/ValidatorRules/useSentAccountCheck.d.ts +5 -0
- package/dist/typings/src/_utils/captchaImage.d.ts +30 -0
- package/dist/typings/src/_utils/captchaRequestQueue.d.ts +1 -0
- package/dist/typings/src/_utils/context.d.ts +2 -2
- package/dist/typings/src/_utils/getCaptchaUrl.d.ts +1 -1
- package/dist/typings/src/_utils/http.d.ts +4 -0
- package/dist/typings/src/_utils/useCaptchaRequest.d.ts +5 -0
- package/package.json +1 -1
|
@@ -3,5 +3,11 @@ import { React } from 'shim-react';
|
|
|
3
3
|
export interface GraphicVerifyCodeProps extends InputProps {
|
|
4
4
|
verifyCodeUrl: string;
|
|
5
5
|
changeCode: () => void;
|
|
6
|
+
imageLoading?: boolean;
|
|
7
|
+
imageHeight?: number;
|
|
8
|
+
imageError?: boolean;
|
|
9
|
+
refreshDisabled?: boolean;
|
|
10
|
+
onImageLoad?: React.ImgHTMLAttributes<HTMLImageElement>['onLoad'];
|
|
11
|
+
onImageError?: React.ImgHTMLAttributes<HTMLImageElement>['onError'];
|
|
6
12
|
}
|
|
7
13
|
export declare const GraphicVerifyCode: React.FC<GraphicVerifyCodeProps>;
|
|
@@ -4,6 +4,7 @@ import { VerifyLoginMethods } from '../../../Type/application';
|
|
|
4
4
|
export interface FormItemIdentifyProps extends FormItemProps {
|
|
5
5
|
checkRepeat?: boolean;
|
|
6
6
|
checkExist?: boolean;
|
|
7
|
+
isExistenceVerified?: (value: string) => boolean;
|
|
7
8
|
methods: VerifyLoginMethods[];
|
|
8
9
|
currentMethod: 'phone-code' | 'email-code';
|
|
9
10
|
areaCode?: string;
|
|
@@ -438,9 +438,9 @@ export interface ApplicationConfig {
|
|
|
438
438
|
desc: I18nLang;
|
|
439
439
|
};
|
|
440
440
|
noticePwdCustomLogo?: string;
|
|
441
|
-
/**
|
|
442
|
-
|
|
443
|
-
|
|
441
|
+
/** 手机号和邮箱存在性查询是否需要图形验证码 */
|
|
442
|
+
enableUserExistenceCheckCaptcha?: boolean;
|
|
443
|
+
/** 开启延迟校验用户是否存在功能 */
|
|
444
444
|
closeCheckSendUser?: boolean;
|
|
445
445
|
resetPwdLinkCustomLogo?: string;
|
|
446
446
|
resetPwdLinkTipsConfig?: {
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { GuardHttp } from '../_utils/guardHttp';
|
|
2
|
+
import { ApplicationConfig } from '../Type/application';
|
|
3
|
+
import { AuthingGuardResponse } from '../_utils/http';
|
|
4
|
+
export declare const findUserWithCaptcha: (get: GuardHttp['get'], config: ApplicationConfig, key: string, type: string, challenge: (request: (captchaCode: string) => Promise<AuthingGuardResponse<boolean>>) => Promise<AuthingGuardResponse<boolean>>) => Promise<AuthingGuardResponse<boolean>>;
|
|
@@ -9,6 +9,8 @@ export interface ValidatorFormItemProps extends FormItemProps {
|
|
|
9
9
|
form?: FormInstance;
|
|
10
10
|
checkRepeat?: boolean;
|
|
11
11
|
checkExist?: boolean;
|
|
12
|
+
isUserCheckVerified?: (value: string) => boolean;
|
|
13
|
+
isExistenceVerified?: (value: string) => boolean;
|
|
12
14
|
areaCode?: string;
|
|
13
15
|
/**
|
|
14
16
|
* 控制内部FormItem组件关于pattern的校验规则
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useCheckRepeat: (checkFn: (value: any, resolve: (value: unknown) => void, reject: (reason?: any) => void) => void) => (_: any, value: any) => Promise<unknown>;
|
|
1
|
+
export declare const useCheckRepeat: (checkFn: (value: any, resolve: (value: unknown) => void, reject: (reason?: any) => void) => void, scope?: string) => (_: any, value: any) => Promise<unknown>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export declare const createCaptchaImage: () => {
|
|
2
|
+
snapshot: () => {
|
|
3
|
+
url: string;
|
|
4
|
+
loading: boolean;
|
|
5
|
+
error: boolean;
|
|
6
|
+
version: number;
|
|
7
|
+
owner: symbol | undefined;
|
|
8
|
+
};
|
|
9
|
+
subscribe: (listener: () => void) => () => void;
|
|
10
|
+
ensure: (host: string, poolId: string, owner?: symbol) => void;
|
|
11
|
+
refresh: (host: string, poolId: string, owner?: symbol) => void;
|
|
12
|
+
consume: (owner: symbol) => void;
|
|
13
|
+
claim: (owner: symbol) => void;
|
|
14
|
+
release: (owner: symbol) => void;
|
|
15
|
+
};
|
|
16
|
+
export declare const captchaImage: {
|
|
17
|
+
snapshot: () => {
|
|
18
|
+
url: string;
|
|
19
|
+
loading: boolean;
|
|
20
|
+
error: boolean;
|
|
21
|
+
version: number;
|
|
22
|
+
owner: symbol | undefined;
|
|
23
|
+
};
|
|
24
|
+
subscribe: (listener: () => void) => () => void;
|
|
25
|
+
ensure: (host: string, poolId: string, owner?: symbol) => void;
|
|
26
|
+
refresh: (host: string, poolId: string, owner?: symbol) => void;
|
|
27
|
+
consume: (owner: symbol) => void;
|
|
28
|
+
claim: (owner: symbol) => void;
|
|
29
|
+
release: (owner: symbol) => void;
|
|
30
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const enqueueCaptchaRequest: <T>(request: () => Promise<T>) => Promise<T>;
|
|
@@ -164,7 +164,7 @@ export declare const useGuardDefaultLanguage: () => Lang;
|
|
|
164
164
|
export declare const useGuardTenantProvider: () => MultipleTenant | undefined;
|
|
165
165
|
/** 当前人机验证策略 */
|
|
166
166
|
export declare const useRobotVerify: () => "always_enable" | "disable" | "condition_set";
|
|
167
|
-
/**
|
|
167
|
+
/** 短信的内联图形验证码;开启存在性验证码时由发送组件按请求展开验证区。 */
|
|
168
168
|
export declare const useSmsCaptchaCheck: (sence: 'login' | 'register' | 'forget-password') => boolean;
|
|
169
|
-
/**
|
|
169
|
+
/** 邮件的内联图形验证码;开启存在性验证码时由发送组件按请求展开验证区。 */
|
|
170
170
|
export declare const useEmailCaptchaCheck: (sence: 'login' | 'register' | 'forget-password') => boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const getCaptchaUrl: (host: string) => string;
|
|
1
|
+
export declare const getCaptchaUrl: (host: string, userPoolId?: string) => string;
|
package/package.json
CHANGED