@authing/guard-shim-react 4.5.40-hep.11 → 4.5.40-hep.13
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 +3432 -3484
- package/dist/typings/src/ChangeLanguage/index.d.ts +2 -2
- package/dist/typings/src/CompleteInfo/core/components/TreeSelect.d.ts +1 -1
- package/dist/typings/src/CompleteInfo/interface.d.ts +1 -1
- package/dist/typings/src/Guard/GuardModule/stateMachine.d.ts +1 -1
- package/dist/typings/src/Guard/authClient.d.ts +6 -4
- package/dist/typings/src/Guard/core/hooks/useMultipleAccounts.d.ts +21 -21
- package/dist/typings/src/Guard/module.d.ts +27 -27
- package/dist/typings/src/Invitation/interface.d.ts +1 -1
- package/dist/typings/src/Login/core/withAuthingOtpPush/types.d.ts +3 -3
- package/dist/typings/src/Login/hooks/useLoginMultiple.d.ts +1 -1
- package/dist/typings/src/MFA/businessRequest.d.ts +1 -1
- package/dist/typings/src/MFA/core/passkey.d.ts +1 -1
- package/dist/typings/src/Qrcode/UiQrCode.d.ts +1 -1
- package/dist/typings/src/Qrcode/WorkQrCode.d.ts +1 -1
- package/dist/typings/src/Qrcode/hooks/useImage.d.ts +1 -1
- package/dist/typings/src/Qrcode/hooks/usePreQrCode.d.ts +2 -2
- package/dist/typings/src/Qrcode/index.d.ts +2 -2
- package/dist/typings/src/SelfUnlock/core/selfUnlock.d.ts +1 -1
- package/dist/typings/src/TenantPortalSelect/interface.d.ts +1 -1
- package/dist/typings/src/Type/application.d.ts +18 -18
- package/dist/typings/src/ValidatorRules/index.d.ts +1 -1
- package/dist/typings/src/_utils/config/index.d.ts +1 -1
- package/dist/typings/src/_utils/context.d.ts +1 -1
- package/dist/typings/src/_utils/countryList.d.ts +2 -0
- package/dist/typings/src/_utils/http.d.ts +1 -1
- package/dist/typings/src/_utils/index.d.ts +1 -1
- package/dist/typings/src/_utils/internationalPhone.d.ts +1 -0
- package/dist/typings/src/_utils/responseManagement/interface.d.ts +2 -2
- package/package.json +1 -1
- package/dist/typings/src/GuardFactory/index.d.ts +0 -83
- package/dist/typings/src/index.cdn.d.ts +0 -4
|
@@ -4,6 +4,6 @@ export declare const LngTextMapping: Record<Lang, {
|
|
|
4
4
|
label: string;
|
|
5
5
|
}>;
|
|
6
6
|
export declare const ChangeLanguage: (props: {
|
|
7
|
-
onLangChange?: (lang: Lang) => void;
|
|
8
|
-
langRange?: Lang[];
|
|
7
|
+
onLangChange?: ((lang: Lang) => void) | undefined;
|
|
8
|
+
langRange?: Lang[] | undefined;
|
|
9
9
|
}) => JSX.Element | null;
|
|
@@ -25,7 +25,7 @@ export interface GuardCompleteInfoViewProps extends GuardCompleteInfoProps {
|
|
|
25
25
|
initData: any;
|
|
26
26
|
onLogin?: any;
|
|
27
27
|
}
|
|
28
|
-
export type ExtendsFieldType = 'user' | 'internal';
|
|
28
|
+
export declare type ExtendsFieldType = 'user' | 'internal';
|
|
29
29
|
export interface ExtendsField {
|
|
30
30
|
type: ExtendsFieldType;
|
|
31
31
|
name: string;
|
|
@@ -14,7 +14,7 @@ export interface StateMachineLog {
|
|
|
14
14
|
date: number;
|
|
15
15
|
dataSource: ModuleState;
|
|
16
16
|
}
|
|
17
|
-
export type ChangeModuleEvent = (nextModule: GuardModuleType, initData?: any) => void;
|
|
17
|
+
export declare type ChangeModuleEvent = (nextModule: GuardModuleType, initData?: any) => void;
|
|
18
18
|
export declare class GuardStateMachine {
|
|
19
19
|
private order;
|
|
20
20
|
private config;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { AuthenticationClient } from 'authing-js-sdk';
|
|
2
2
|
import { GuardLocalConfig } from './config';
|
|
3
|
+
declare let authClient: AuthenticationClient;
|
|
3
4
|
export declare const initGuardAuthClient: (config: GuardLocalConfig, appId: string, tenantId?: string) => AuthenticationClient;
|
|
4
5
|
export declare const useInitGuardAuthClient: (props: {
|
|
5
|
-
config?: GuardLocalConfig;
|
|
6
|
-
appId?: string;
|
|
7
|
-
authClient?: AuthenticationClient;
|
|
6
|
+
config?: GuardLocalConfig | undefined;
|
|
7
|
+
appId?: string | undefined;
|
|
8
|
+
authClient?: AuthenticationClient | undefined;
|
|
8
9
|
setError?: any;
|
|
9
|
-
tenantId?: string;
|
|
10
|
+
tenantId?: string | undefined;
|
|
10
11
|
}) => AuthenticationClient | undefined;
|
|
11
12
|
export declare const getGuardAuthClient: () => AuthenticationClient;
|
|
12
13
|
export declare const useGuardAuthClient: () => AuthenticationClient;
|
|
14
|
+
export {};
|
|
@@ -13,7 +13,7 @@ export declare const QR_CODE_WAY: LoginWay[];
|
|
|
13
13
|
* 登录时所有支持的登录列表(前端定义列表)
|
|
14
14
|
* 这里稍微有点乱 因为Login中的登录方式和这里的不匹配,暂时放在了一起
|
|
15
15
|
*/
|
|
16
|
-
export type LoginWay = 'email' | 'phone' | 'password' | 'phone-code' | 'email-code' | 'social' | 'wechat-miniprogram-qrcode' | 'wechatmp-qrcode' | 'app-qrcode' | 'zjzwfw-qrcode' | 'ad' | 'ldap' | 'ldap-password' | 'ldap-email' | 'ldap-phone' | 'authing-otp-push';
|
|
16
|
+
export declare type LoginWay = 'email' | 'phone' | 'password' | 'phone-code' | 'email-code' | 'social' | 'wechat-miniprogram-qrcode' | 'wechatmp-qrcode' | 'app-qrcode' | 'zjzwfw-qrcode' | 'ad' | 'ldap' | 'ldap-password' | 'ldap-email' | 'ldap-phone' | 'authing-otp-push';
|
|
17
17
|
/**
|
|
18
18
|
* when: 多账号页面跳转进入登录页面
|
|
19
19
|
* 携带的回填数据信息
|
|
@@ -27,7 +27,7 @@ export interface BackFillMultipleState extends Omit<User, 'id' | 'name' | 'nickn
|
|
|
27
27
|
/**
|
|
28
28
|
* Store instance
|
|
29
29
|
*/
|
|
30
|
-
export type StoreInstance = ReturnType<MultipleAccount['getStore']>;
|
|
30
|
+
export declare type StoreInstance = ReturnType<MultipleAccount['getStore']>;
|
|
31
31
|
/**
|
|
32
32
|
* 当前 userId 对应的类型
|
|
33
33
|
*/
|
|
@@ -248,18 +248,18 @@ declare class MultipleAccount {
|
|
|
248
248
|
}) => void;
|
|
249
249
|
setUserInfo: (user: Omit<User & {
|
|
250
250
|
id: string;
|
|
251
|
-
loginAccount?: string;
|
|
252
|
-
usertype?: string;
|
|
253
|
-
},
|
|
251
|
+
loginAccount?: string | undefined;
|
|
252
|
+
usertype?: string | undefined;
|
|
253
|
+
}, "way" | "tab" | "phoneCountryCode">) => void;
|
|
254
254
|
setLoginWayByHttpData: (account: string, data: {
|
|
255
|
-
username?: string;
|
|
256
|
-
phone?: string;
|
|
257
|
-
email?: string;
|
|
255
|
+
username?: string | undefined;
|
|
256
|
+
phone?: string | undefined;
|
|
257
|
+
email?: string | undefined;
|
|
258
258
|
}) => void;
|
|
259
259
|
setLoginWayByLDAPData: (account: string, data: {
|
|
260
|
-
name?: string;
|
|
261
|
-
phone?: string;
|
|
262
|
-
email?: string;
|
|
260
|
+
name?: string | undefined;
|
|
261
|
+
phone?: string | undefined;
|
|
262
|
+
email?: string | undefined;
|
|
263
263
|
}) => void;
|
|
264
264
|
getMemoUser: (excludeWays?: LoginWay[]) => SelectOptions[];
|
|
265
265
|
getMemoSingleUser: (id: string) => {
|
|
@@ -278,7 +278,7 @@ declare class MultipleAccount {
|
|
|
278
278
|
* Finally Config 类型过滤
|
|
279
279
|
*/
|
|
280
280
|
declare const useSelectAccounts: ({ appId, finallyConfig }: {
|
|
281
|
-
appId?: string;
|
|
281
|
+
appId?: string | undefined;
|
|
282
282
|
finallyConfig?: any;
|
|
283
283
|
}) => {
|
|
284
284
|
instance: {
|
|
@@ -292,18 +292,18 @@ declare const useSelectAccounts: ({ appId, finallyConfig }: {
|
|
|
292
292
|
}) => void;
|
|
293
293
|
setUserInfo: (user: Omit<User & {
|
|
294
294
|
id: string;
|
|
295
|
-
loginAccount?: string;
|
|
296
|
-
usertype?: string;
|
|
297
|
-
},
|
|
295
|
+
loginAccount?: string | undefined;
|
|
296
|
+
usertype?: string | undefined;
|
|
297
|
+
}, "way" | "tab" | "phoneCountryCode">) => void;
|
|
298
298
|
setLoginWayByHttpData: (account: string, data: {
|
|
299
|
-
username?: string;
|
|
300
|
-
phone?: string;
|
|
301
|
-
email?: string;
|
|
299
|
+
username?: string | undefined;
|
|
300
|
+
phone?: string | undefined;
|
|
301
|
+
email?: string | undefined;
|
|
302
302
|
}) => void;
|
|
303
303
|
setLoginWayByLDAPData: (account: string, data: {
|
|
304
|
-
name?: string;
|
|
305
|
-
phone?: string;
|
|
306
|
-
email?: string;
|
|
304
|
+
name?: string | undefined;
|
|
305
|
+
phone?: string | undefined;
|
|
306
|
+
email?: string | undefined;
|
|
307
307
|
}) => void;
|
|
308
308
|
getMemoUser: (excludeWays?: LoginWay[]) => SelectOptions[];
|
|
309
309
|
getMemoSingleUser: (id: string) => {
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
export declare enum GuardModuleType {
|
|
2
|
-
ERROR = "error"
|
|
3
|
-
LOGIN = "login"
|
|
4
|
-
REGISTER = "register"
|
|
5
|
-
MFA = "mfa"
|
|
6
|
-
FORGET_PWD = "forgetPassword"
|
|
7
|
-
FORCED_PASSWORD_RESET = "forcedPasswordReset"
|
|
8
|
-
NOTICE_PASSWORD_RESET = "noticePasswordReset"
|
|
9
|
-
FIRST_LOGIN_PASSWORD = "firstLoginPassword"
|
|
10
|
-
UNSAFE_PASSWORD_RESET = "unsafePasswordReset"
|
|
11
|
-
DOWNLOAD_AT = "downloadAT"
|
|
12
|
-
BIND_TOTP = "bindTotp"
|
|
13
|
-
ANY_QUESTIONS = "anyQuestions"
|
|
14
|
-
LOGIN_COMPLETE_INFO = "loginCompleteInfo"
|
|
15
|
-
REGISTER_PASSWORD = "registerPassword"
|
|
16
|
-
REGISTER_COMPLETE_INFO = "registerCompleteInfo"
|
|
17
|
-
RECOVERY_CODE = "recoveryCode"
|
|
18
|
-
SUBMIT_SUCCESS = "submitSuccess"
|
|
19
|
-
IDENTITY_BINDING_ASK = "identityBindingAsk"
|
|
20
|
-
IDENTITY_BINDING = "identityBinding"
|
|
21
|
-
IDENTITY_BINDING_NO_ASK = "identityBindingNoAsk"
|
|
22
|
-
SELF_UNLOCK = "selfUnlock"
|
|
23
|
-
FLOW_SELECT_ACCOUNT = "flowSelectAccount"
|
|
2
|
+
ERROR = "error",
|
|
3
|
+
LOGIN = "login",
|
|
4
|
+
REGISTER = "register",
|
|
5
|
+
MFA = "mfa",
|
|
6
|
+
FORGET_PWD = "forgetPassword",
|
|
7
|
+
FORCED_PASSWORD_RESET = "forcedPasswordReset",
|
|
8
|
+
NOTICE_PASSWORD_RESET = "noticePasswordReset",
|
|
9
|
+
FIRST_LOGIN_PASSWORD = "firstLoginPassword",
|
|
10
|
+
UNSAFE_PASSWORD_RESET = "unsafePasswordReset",
|
|
11
|
+
DOWNLOAD_AT = "downloadAT",
|
|
12
|
+
BIND_TOTP = "bindTotp",
|
|
13
|
+
ANY_QUESTIONS = "anyQuestions",
|
|
14
|
+
LOGIN_COMPLETE_INFO = "loginCompleteInfo",
|
|
15
|
+
REGISTER_PASSWORD = "registerPassword",
|
|
16
|
+
REGISTER_COMPLETE_INFO = "registerCompleteInfo",
|
|
17
|
+
RECOVERY_CODE = "recoveryCode",
|
|
18
|
+
SUBMIT_SUCCESS = "submitSuccess",
|
|
19
|
+
IDENTITY_BINDING_ASK = "identityBindingAsk",
|
|
20
|
+
IDENTITY_BINDING = "identityBinding",
|
|
21
|
+
IDENTITY_BINDING_NO_ASK = "identityBindingNoAsk",
|
|
22
|
+
SELF_UNLOCK = "selfUnlock",
|
|
23
|
+
FLOW_SELECT_ACCOUNT = "flowSelectAccount",
|
|
24
24
|
/** 多租户门户选择页 */
|
|
25
25
|
TENANT_PORTAL = "tenant-portal",
|
|
26
|
-
New_SUBMIT_SUCCESS = "newSubmitSuccess"
|
|
27
|
-
SELECT_ACCOUNT_2_LOGIN = "selectAccout2Login"
|
|
26
|
+
New_SUBMIT_SUCCESS = "newSubmitSuccess",
|
|
27
|
+
SELECT_ACCOUNT_2_LOGIN = "selectAccout2Login",
|
|
28
28
|
RESET_ACCOUNT_NAME = "resetAccountName",
|
|
29
29
|
/** 高教社特殊节点 */
|
|
30
30
|
CUSTOM_COMPLETE_INFO = "customCompleteInfo",
|
|
@@ -34,9 +34,9 @@ export declare enum GuardModuleType {
|
|
|
34
34
|
MESSAGE = "message",
|
|
35
35
|
INVITE_AUTH = "inviteAuth",
|
|
36
36
|
INVITE_COMPLETE = "inviteComplete",
|
|
37
|
-
INVITE_EXPIRE = "inviteExpire"
|
|
38
|
-
INVITE_PAGE_EXPIRE = "invitePageExpire"
|
|
39
|
-
INVITE_SUCCESS = "inviteSuccess"
|
|
37
|
+
INVITE_EXPIRE = "inviteExpire",
|
|
38
|
+
INVITE_PAGE_EXPIRE = "invitePageExpire",
|
|
39
|
+
INVITE_SUCCESS = "inviteSuccess",
|
|
40
40
|
RESET_PASSWORD = "resetPassword"
|
|
41
41
|
}
|
|
42
42
|
export interface GuardModuleAction {
|
|
@@ -10,7 +10,7 @@ export interface OnLoginProps {
|
|
|
10
10
|
account: string;
|
|
11
11
|
agreementIds?: (string | number)[];
|
|
12
12
|
}
|
|
13
|
-
export type LoginStatus = 'before' | 'pending';
|
|
13
|
+
export declare type LoginStatus = 'before' | 'pending';
|
|
14
14
|
export interface LoginWithAuthingOtpPushProps {
|
|
15
15
|
onLoginSuccess?: any;
|
|
16
16
|
multipleInstance?: StoreInstance;
|
|
@@ -21,9 +21,9 @@ export interface PushLoginGudeModalProps {
|
|
|
21
21
|
visible: boolean;
|
|
22
22
|
onClose: () => void;
|
|
23
23
|
}
|
|
24
|
-
export type Selector = 'howUsePushLogin' | 'howBindClient' | 'howGetAppLoginUrl';
|
|
24
|
+
export declare type Selector = 'howUsePushLogin' | 'howBindClient' | 'howGetAppLoginUrl';
|
|
25
25
|
export interface SelectorOption {
|
|
26
26
|
value: Selector;
|
|
27
27
|
label: string;
|
|
28
28
|
}
|
|
29
|
-
export type SelectorOptions = SelectorOption[];
|
|
29
|
+
export declare type SelectorOptions = SelectorOption[];
|
|
@@ -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
|
+
}, "way" | "tab" | "phoneCountryCode">) => void;
|
|
43
43
|
setLoginWayByHttpData: (account: string, data: {
|
|
44
44
|
username?: string | undefined;
|
|
45
45
|
phone?: string | undefined;
|
|
@@ -35,7 +35,7 @@ interface AssociateFaceContent {
|
|
|
35
35
|
isExternalPhoto?: boolean;
|
|
36
36
|
mfaToken?: string;
|
|
37
37
|
}
|
|
38
|
-
type BindPasskeyContent = PublicKeyCredentialWithAttestationJSON;
|
|
38
|
+
declare type BindPasskeyContent = PublicKeyCredentialWithAttestationJSON;
|
|
39
39
|
interface VerifyPasskeyContent {
|
|
40
40
|
credential: PublicKeyCredentialWithAssertionJSON;
|
|
41
41
|
ticket: string;
|
|
@@ -9,7 +9,7 @@ interface VerifyPasskeyProps {
|
|
|
9
9
|
mfaToken: string;
|
|
10
10
|
mfaLogin: (code: any, data: any, message?: string) => void;
|
|
11
11
|
}
|
|
12
|
-
export type MFAPasskeyProps = BindPasskeyProps & VerifyPasskeyProps & {
|
|
12
|
+
export declare type MFAPasskeyProps = BindPasskeyProps & VerifyPasskeyProps & {
|
|
13
13
|
passkeyEnabled: boolean;
|
|
14
14
|
};
|
|
15
15
|
export declare const MFAPasskey: React.FC<MFAPasskeyProps>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { React } from 'shim-react';
|
|
2
2
|
import './index.less';
|
|
3
3
|
import { CodeStatusDescriptions } from './WorkQrCode';
|
|
4
|
-
export type CodeStatus = 'loading' | 'ready' | 'already' | 'success' | 'error' | 'expired' | 'cancel' | 'MFA';
|
|
4
|
+
export declare type CodeStatus = 'loading' | 'ready' | 'already' | 'success' | 'error' | 'expired' | 'cancel' | 'MFA';
|
|
5
5
|
export declare const prefix = "refactor";
|
|
6
6
|
export interface UiQrProps {
|
|
7
7
|
/**
|
|
@@ -4,7 +4,7 @@ import { CodeStatus, UiQrProps } from './UiQrCode';
|
|
|
4
4
|
/**
|
|
5
5
|
* 二维码不同状态下的底部描述文字
|
|
6
6
|
*/
|
|
7
|
-
export type CodeStatusDescriptions = Partial<Record<Exclude<CodeStatus, 'loading'>, React.ReactNode | ((referQrCode?: () => void) => React.ReactNode)>>;
|
|
7
|
+
export declare type CodeStatusDescriptions = Partial<Record<Exclude<CodeStatus, 'loading'>, React.ReactNode | ((referQrCode?: () => void) => React.ReactNode)>>;
|
|
8
8
|
export interface WorkQrCodeRef {
|
|
9
9
|
referQrCode: () => Promise<{
|
|
10
10
|
random: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { React } from 'shim-react';
|
|
2
2
|
import { CodeStatus } from '../UiQrCode';
|
|
3
|
-
export type ReducerType = 'change' | 'changeStatus' | 'changeDesc';
|
|
4
|
-
export type RootState = {
|
|
3
|
+
export declare type ReducerType = 'change' | 'changeStatus' | 'changeDesc';
|
|
4
|
+
export declare type RootState = {
|
|
5
5
|
/**
|
|
6
6
|
* 状态
|
|
7
7
|
*/
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { UiQrCode, LinkQrcode } from './UiQrCode';
|
|
2
2
|
import { WorkQrCode, WorkGeneQrCode } from './WorkQrCode';
|
|
3
|
-
type IQrCode = typeof WorkQrCode & {
|
|
3
|
+
declare type IQrCode = typeof WorkQrCode & {
|
|
4
4
|
UI: typeof UiQrCode;
|
|
5
5
|
};
|
|
6
|
-
type IGeneQrCode = typeof WorkGeneQrCode & {
|
|
6
|
+
declare type IGeneQrCode = typeof WorkGeneQrCode & {
|
|
7
7
|
UI: typeof LinkQrcode;
|
|
8
8
|
};
|
|
9
9
|
declare const QrCode: IQrCode;
|
|
@@ -31,7 +31,7 @@ export interface TenantPortalEvents extends IG2Events {
|
|
|
31
31
|
/** 租户门户选择回调 */
|
|
32
32
|
onTenantSelect?: (data?: TenantPortalSelectType) => void;
|
|
33
33
|
}
|
|
34
|
-
export type TenantView = 'default' | 'join' | 'create';
|
|
34
|
+
export declare type TenantView = 'default' | 'join' | 'create';
|
|
35
35
|
export interface TenantButtonProps {
|
|
36
36
|
className?: string;
|
|
37
37
|
onClick?: () => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type Lang = 'zh-CN' | 'en-US' | 'zh-TW' | 'ja-JP';
|
|
1
|
+
export declare type Lang = 'zh-CN' | 'en-US' | 'zh-TW' | 'ja-JP';
|
|
2
2
|
import { MFAType } from '../MFA/interface';
|
|
3
3
|
import { PasswordStrength } from '../_utils';
|
|
4
4
|
export * from 'authing-js-sdk';
|
|
@@ -7,16 +7,16 @@ export declare enum LoginMethods {
|
|
|
7
7
|
AppQr = "app-qrcode",
|
|
8
8
|
Password = "password",
|
|
9
9
|
PhoneCode = "phone-code",
|
|
10
|
-
EmailCode = "email-code"
|
|
11
|
-
WxMinQr = "wechat-miniprogram-qrcode"
|
|
12
|
-
AD = "ad"
|
|
13
|
-
WechatMpQrcode = "wechatmp-qrcode"
|
|
14
|
-
AuthingOtpPush = "authing-otp-push"
|
|
15
|
-
WechatworkCorpQrconnect = "wechatwork-corp-qrconnect"
|
|
16
|
-
WECHATWORKQRCONNECTOFAUTHINGAGENCY = "wechatwork-authing-agency-qrcode"
|
|
17
|
-
WECHATWORKAGENCYQRCONNECT = "wechatwork-agency-qrcode"
|
|
18
|
-
DingTalkQrcode = "dingtalk-qrcode"
|
|
19
|
-
Passkey = "passkey"
|
|
10
|
+
EmailCode = "email-code",
|
|
11
|
+
WxMinQr = "wechat-miniprogram-qrcode",
|
|
12
|
+
AD = "ad",
|
|
13
|
+
WechatMpQrcode = "wechatmp-qrcode",
|
|
14
|
+
AuthingOtpPush = "authing-otp-push",
|
|
15
|
+
WechatworkCorpQrconnect = "wechatwork-corp-qrconnect",
|
|
16
|
+
WECHATWORKQRCONNECTOFAUTHINGAGENCY = "wechatwork-authing-agency-qrcode",
|
|
17
|
+
WECHATWORKAGENCYQRCONNECT = "wechatwork-agency-qrcode",
|
|
18
|
+
DingTalkQrcode = "dingtalk-qrcode",
|
|
19
|
+
Passkey = "passkey",
|
|
20
20
|
ZJZWFWQrcode = "zjzwfw-qrcode"
|
|
21
21
|
}
|
|
22
22
|
export declare enum OIDCConnectionMode {
|
|
@@ -37,8 +37,8 @@ export declare enum SocialConnectionProvider {
|
|
|
37
37
|
WECHATWORK_ADDRESS_BOOK = "wechatwork:addressbook",
|
|
38
38
|
WECHATWORK_CORP_QRCONNECT = "wechatwork:corp:qrconnect",
|
|
39
39
|
WECHATWORK_SERVICEPROVIDER_QRCONNECT = "wechatwork:service-provider:qrconnect",
|
|
40
|
-
WECHATWORK_QRCONNECT_OF_AUTHING_AGENCY = "wechatwork:qrconnect:of:authing:agency"
|
|
41
|
-
WECHATWORK_AGENCY_QRCONNECT = "wechatwork:agency:qrconnect"
|
|
40
|
+
WECHATWORK_QRCONNECT_OF_AUTHING_AGENCY = "wechatwork:qrconnect:of:authing:agency",
|
|
41
|
+
WECHATWORK_AGENCY_QRCONNECT = "wechatwork:agency:qrconnect",
|
|
42
42
|
DINGTALK = "dingtalk",
|
|
43
43
|
WEIBO = "weibo",
|
|
44
44
|
APPLE = "apple",
|
|
@@ -135,7 +135,7 @@ export interface QrCodeItem {
|
|
|
135
135
|
authorizationUrl?: string;
|
|
136
136
|
};
|
|
137
137
|
}
|
|
138
|
-
export type QrcodeTabsSettings = Record<LoginMethods, Array<QrCodeItem>>;
|
|
138
|
+
export declare type QrcodeTabsSettings = Record<LoginMethods, Array<QrCodeItem>>;
|
|
139
139
|
export interface OidcClientMetadata {
|
|
140
140
|
grant_types: string[];
|
|
141
141
|
client_id: string;
|
|
@@ -170,7 +170,7 @@ export interface UserExtendsField {
|
|
|
170
170
|
required: boolean;
|
|
171
171
|
validateRules: any[];
|
|
172
172
|
}
|
|
173
|
-
export type ExtendsField = InternalExtendsField | UserExtendsField;
|
|
173
|
+
export declare type ExtendsField = InternalExtendsField | UserExtendsField;
|
|
174
174
|
export interface ApplicationPasswordTabConfig {
|
|
175
175
|
enabledLoginMethods?: PasswordLoginMethods[];
|
|
176
176
|
validRegisterMethods?: string[];
|
|
@@ -188,9 +188,9 @@ export interface Agreement {
|
|
|
188
188
|
lang: Lang;
|
|
189
189
|
availableAt?: number;
|
|
190
190
|
}
|
|
191
|
-
export type PasswordLoginMethods = 'username-password' | 'email-password' | 'phone-password';
|
|
192
|
-
export type VerifyLoginMethods = 'email-code' | 'phone-code';
|
|
193
|
-
export type ComplateFiledsPlace = 'register' | 'login';
|
|
191
|
+
export declare type PasswordLoginMethods = 'username-password' | 'email-password' | 'phone-password';
|
|
192
|
+
export declare type VerifyLoginMethods = 'email-code' | 'phone-code';
|
|
193
|
+
export declare type ComplateFiledsPlace = 'register' | 'login';
|
|
194
194
|
export interface TabFieldsI18nItem {
|
|
195
195
|
key: string;
|
|
196
196
|
label: string;
|
|
@@ -21,7 +21,7 @@ export interface ValidatorFormItemMetaProps extends ValidatorFormItemProps {
|
|
|
21
21
|
export interface ICheckProps {
|
|
22
22
|
check: (values: any) => void;
|
|
23
23
|
}
|
|
24
|
-
type InternalFormItemType = typeof Form.Item;
|
|
24
|
+
declare type InternalFormItemType = typeof Form.Item;
|
|
25
25
|
interface FormItemInterface extends InternalFormItemType {
|
|
26
26
|
Password: typeof PasswordFormItem;
|
|
27
27
|
Email: typeof EmailFormItem;
|
|
@@ -53,7 +53,7 @@ export declare const useFetchConsoleConfig: (forceUpdate: number, appId?: string
|
|
|
53
53
|
loginMethods?: LoginMethods[] | undefined;
|
|
54
54
|
passwordLoginMethods?: string[] | undefined;
|
|
55
55
|
socialConnections?: import("../../Type").SocialConnectionProvider[] | undefined;
|
|
56
|
-
socialConnectionsBtnShape?: "
|
|
56
|
+
socialConnectionsBtnShape?: "button" | "default" | "icon" | undefined;
|
|
57
57
|
enterpriseConnections?: string[] | undefined;
|
|
58
58
|
qrCodeScanOptions?: {
|
|
59
59
|
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
|
+
}, "way" | "tab" | "phoneCountryCode">) => void;
|
|
127
127
|
setLoginWayByHttpData: (account: string, data: {
|
|
128
128
|
username?: string | undefined;
|
|
129
129
|
phone?: string | undefined;
|
|
@@ -5,7 +5,7 @@ export declare const requestClient: {
|
|
|
5
5
|
get<T>(path: string, query?: Record<string, any>, init?: AxiosRequestConfig): Promise<AuthingResponse<T>>;
|
|
6
6
|
post<T_1>(path: string, data: any, config?: {
|
|
7
7
|
headers: any;
|
|
8
|
-
}): Promise<AuthingResponse<T_1>>;
|
|
8
|
+
} | undefined): Promise<AuthingResponse<T_1>>;
|
|
9
9
|
postForm<T_2>(path: string, formData: any, config?: {
|
|
10
10
|
headers: any;
|
|
11
11
|
}): Promise<AuthingResponse<T_2>>;
|
|
@@ -14,7 +14,7 @@ export declare const validate: (type: keyof typeof VALIDATE_PATTERN, val: string
|
|
|
14
14
|
export declare const getRequiredRules: (msg: string) => Rule[];
|
|
15
15
|
export declare const fieldRequiredRule: (fieldRequiredRule: string, fieldRequiredRuleMessage?: string) => Rule[];
|
|
16
16
|
export declare function getDeviceName(): string | null | undefined;
|
|
17
|
-
export type STYLE_RECORD_KEY = 'appConfig' | 'userConfig';
|
|
17
|
+
export declare type STYLE_RECORD_KEY = 'appConfig' | 'userConfig';
|
|
18
18
|
export declare const insertStyles: (styles: string | any, recordKey?: STYLE_RECORD_KEY) => void;
|
|
19
19
|
export declare const removeStyles: (recordKey: STYLE_RECORD_KEY) => void;
|
|
20
20
|
export declare const getClassnames: (classnames: (string | boolean | undefined)[]) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const internationalPhoneCountries: import("./countryList").IsoType[];
|
|
@@ -23,8 +23,8 @@ export declare enum ApiCode {
|
|
|
23
23
|
FLOW_SELECT_ACCOUNT = 2921,
|
|
24
24
|
SELECT_ACCOUNT_2_LOGIN = 2930,
|
|
25
25
|
TENANT_PORTAL = 1644,
|
|
26
|
-
RESET_ACCOUNT_NAME = 1108
|
|
27
|
-
INVITE_EXPIRE = 4032
|
|
26
|
+
RESET_ACCOUNT_NAME = 1108,
|
|
27
|
+
INVITE_EXPIRE = 4032,
|
|
28
28
|
INVITE_PAGE_EXPIRE = 4033
|
|
29
29
|
}
|
|
30
30
|
export declare const ChangeModuleApiCodeMapping: Record<string, GuardModuleType>;
|
package/package.json
CHANGED
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { React } from 'shim-react';
|
|
2
|
-
import { GuardEventsKebabToCamelType, GuardModuleType, GuardMode, IG2FCProps, IG2Config, User, Lang, AuthenticationClient } from '../';
|
|
3
|
-
export * from '../';
|
|
4
|
-
export interface GuardFactoryOptions extends IG2FCProps {
|
|
5
|
-
appId: string;
|
|
6
|
-
host?: string;
|
|
7
|
-
redirectUri?: string;
|
|
8
|
-
mode?: GuardMode;
|
|
9
|
-
defaultScene?: GuardModuleType;
|
|
10
|
-
tenantId?: string;
|
|
11
|
-
lang?: Lang;
|
|
12
|
-
isSSO?: boolean;
|
|
13
|
-
config?: Partial<IG2Config>;
|
|
14
|
-
style?: React.CSSProperties;
|
|
15
|
-
}
|
|
16
|
-
export interface GuardEventListeners {
|
|
17
|
-
[key: string]: Function[];
|
|
18
|
-
}
|
|
19
|
-
export interface StartWithRedirectOptions {
|
|
20
|
-
codeChallengeMethod?: 'S256' | 'plain';
|
|
21
|
-
scope?: string;
|
|
22
|
-
state?: string;
|
|
23
|
-
responseType?: 'code' | 'code id_token token' | 'code id_token' | 'code token' | 'id_token token' | 'id_token' | 'none';
|
|
24
|
-
responseMode?: 'query' | 'fragment' | 'form_post';
|
|
25
|
-
nonce?: string;
|
|
26
|
-
}
|
|
27
|
-
export interface LogoutParams {
|
|
28
|
-
redirectUri?: string;
|
|
29
|
-
quitCurrentDevice?: boolean;
|
|
30
|
-
}
|
|
31
|
-
export declare class GuardFactory {
|
|
32
|
-
options: GuardFactoryOptions;
|
|
33
|
-
private visible;
|
|
34
|
-
private then;
|
|
35
|
-
private publicConfig?;
|
|
36
|
-
constructor(options: GuardFactoryOptions);
|
|
37
|
-
private adaptOptions;
|
|
38
|
-
private getRequestHost;
|
|
39
|
-
private getPublicConfig;
|
|
40
|
-
getAuthClient(): Promise<AuthenticationClient>;
|
|
41
|
-
static getGuardContainer(selector?: string | HTMLElement): Element | null;
|
|
42
|
-
private eventListeners;
|
|
43
|
-
/**
|
|
44
|
-
* 启动嵌入模式
|
|
45
|
-
* @param el String
|
|
46
|
-
* @returns Promise
|
|
47
|
-
*/
|
|
48
|
-
start(el?: string): Promise<User>;
|
|
49
|
-
startRegister(): void;
|
|
50
|
-
checkLoginStatus(): Promise<any | undefined>;
|
|
51
|
-
changeLang(lang: Lang): void;
|
|
52
|
-
changeContentCSS(contentCSS: string): void;
|
|
53
|
-
/**
|
|
54
|
-
* 启动跳转模式
|
|
55
|
-
*/
|
|
56
|
-
startWithRedirect(options?: StartWithRedirectOptions): Promise<void>;
|
|
57
|
-
handleRedirectCallback(): Promise<void>;
|
|
58
|
-
private getAccessTokenByCode;
|
|
59
|
-
private getCodeAndCodeChallenge;
|
|
60
|
-
private setTokenCache;
|
|
61
|
-
private clearTokenCache;
|
|
62
|
-
private clearLoginCache;
|
|
63
|
-
private parseUrlQuery;
|
|
64
|
-
/**
|
|
65
|
-
* 获取当前用户信息
|
|
66
|
-
*/
|
|
67
|
-
trackSession(): Promise<User | null>;
|
|
68
|
-
logout(params?: LogoutParams): Promise<void>;
|
|
69
|
-
render(): Promise<void | Element | React.Component<any, any, any>>;
|
|
70
|
-
on<T extends keyof GuardEventsKebabToCamelType>(evt: T, handler: (userInfo: User) => void): void;
|
|
71
|
-
show(): void;
|
|
72
|
-
hide(): void;
|
|
73
|
-
unmount(): void;
|
|
74
|
-
getCurrentView(): {
|
|
75
|
-
currentModule: any;
|
|
76
|
-
currentTab: any;
|
|
77
|
-
};
|
|
78
|
-
changeView(currentView: string): Promise<void>;
|
|
79
|
-
private getAgreementsContext;
|
|
80
|
-
checkAllAgreements(): void;
|
|
81
|
-
unCheckAllAgreements(): void;
|
|
82
|
-
}
|
|
83
|
-
export default GuardFactory;
|