@authing/guard-shim-react 6.0.0-alpha.0

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.
Files changed (206) hide show
  1. package/README.md +3 -0
  2. package/dist/index.min.css +2 -0
  3. package/dist/index.min.js +2 -0
  4. package/dist/typings/example.d.ts +1 -0
  5. package/dist/typings/shim-antd4/index.d.ts +3 -0
  6. package/dist/typings/shim-antd5/index.d.ts +2 -0
  7. package/dist/typings/shim-react16/index.d.ts +8 -0
  8. package/dist/typings/shim-react18/index.d.ts +8 -0
  9. package/dist/typings/src/AuthClientProvider/AuthClientProvider.d.ts +6 -0
  10. package/dist/typings/src/AuthClientProvider/context.d.ts +6 -0
  11. package/dist/typings/src/AuthClientProvider/index.d.ts +2 -0
  12. package/dist/typings/src/Back/index.d.ts +12 -0
  13. package/dist/typings/src/BindTotp/businessRequest.d.ts +5 -0
  14. package/dist/typings/src/BindTotp/core/bindSuccess.d.ts +6 -0
  15. package/dist/typings/src/BindTotp/core/securityCode.d.ts +8 -0
  16. package/dist/typings/src/BindTotp/index.d.ts +7 -0
  17. package/dist/typings/src/BindTotp/interface.d.ts +20 -0
  18. package/dist/typings/src/ChangeLanguage/index.d.ts +9 -0
  19. package/dist/typings/src/ChangePassword/businessRequest.d.ts +9 -0
  20. package/dist/typings/src/ChangePassword/core/PasswordNotSafeReset.d.ts +6 -0
  21. package/dist/typings/src/ChangePassword/core/completePassword.d.ts +2 -0
  22. package/dist/typings/src/ChangePassword/core/firstLoginReset.d.ts +6 -0
  23. package/dist/typings/src/ChangePassword/core/rotateReset.d.ts +6 -0
  24. package/dist/typings/src/ChangePassword/index.d.ts +11 -0
  25. package/dist/typings/src/CommonFormItem/context.d.ts +4 -0
  26. package/dist/typings/src/CommonFormItem/index.d.ts +8 -0
  27. package/dist/typings/src/CommonInput/index.d.ts +6 -0
  28. package/dist/typings/src/CompleteInfo/businessRequest.d.ts +9 -0
  29. package/dist/typings/src/CompleteInfo/core/completeInfo.d.ts +11 -0
  30. package/dist/typings/src/CompleteInfo/index.d.ts +11 -0
  31. package/dist/typings/src/CompleteInfo/interface.d.ts +100 -0
  32. package/dist/typings/src/CompleteInfo/utils.d.ts +18 -0
  33. package/dist/typings/src/CopyAbleText/index.d.ts +5 -0
  34. package/dist/typings/src/DownloadAuthenticator/index.d.ts +3 -0
  35. package/dist/typings/src/DownloadAuthenticator/interface.d.ts +12 -0
  36. package/dist/typings/src/Error/index.d.ts +6 -0
  37. package/dist/typings/src/Error/interface.d.ts +8 -0
  38. package/dist/typings/src/ForgetPassword/InputPassword/index.d.ts +3 -0
  39. package/dist/typings/src/ForgetPassword/core/inputIdentify.d.ts +7 -0
  40. package/dist/typings/src/ForgetPassword/core/resetPassword.d.ts +15 -0
  41. package/dist/typings/src/ForgetPassword/index.d.ts +2 -0
  42. package/dist/typings/src/ForgetPassword/interface.d.ts +19 -0
  43. package/dist/typings/src/Guard/Guard.d.ts +10 -0
  44. package/dist/typings/src/Guard/GuardModule/stateMachine.d.ts +38 -0
  45. package/dist/typings/src/Guard/authClient.d.ts +14 -0
  46. package/dist/typings/src/Guard/config.d.ts +17 -0
  47. package/dist/typings/src/Guard/core/hooks/useAgreements.d.ts +14 -0
  48. package/dist/typings/src/Guard/core/hooks/useGuardView.d.ts +7 -0
  49. package/dist/typings/src/Guard/core/hooks/useMultipleAccounts.d.ts +322 -0
  50. package/dist/typings/src/Guard/core/index.d.ts +7 -0
  51. package/dist/typings/src/Guard/core/renderContext.d.ts +8 -0
  52. package/dist/typings/src/Guard/core/renderModule.d.ts +11 -0
  53. package/dist/typings/src/Guard/core/useAppendConfig.d.ts +4 -0
  54. package/dist/typings/src/Guard/core/usePlugin.d.ts +3 -0
  55. package/dist/typings/src/Guard/event.d.ts +70 -0
  56. package/dist/typings/src/Guard/index.d.ts +4 -0
  57. package/dist/typings/src/Guard/module.d.ts +34 -0
  58. package/dist/typings/src/Guard/sso.d.ts +19 -0
  59. package/dist/typings/src/GuardButton/GuardButton.d.ts +6 -0
  60. package/dist/typings/src/GuardButton/index.d.ts +1 -0
  61. package/dist/typings/src/GuardFace/index.d.ts +16 -0
  62. package/dist/typings/src/GuardSelect/index.d.ts +29 -0
  63. package/dist/typings/src/IconFont/iconfont.d.ts +1 -0
  64. package/dist/typings/src/IconFont/index.d.ts +8 -0
  65. package/dist/typings/src/IconFont/useGuardIconfont.d.ts +1 -0
  66. package/dist/typings/src/IdentityBinding/IdentityBinding.d.ts +5 -0
  67. package/dist/typings/src/IdentityBinding/businessRequest.d.ts +36 -0
  68. package/dist/typings/src/IdentityBinding/index.d.ts +2 -0
  69. package/dist/typings/src/IdentityBinding/interface.d.ts +27 -0
  70. package/dist/typings/src/IdentityBindingAsk/IdentityBindingAsk.d.ts +3 -0
  71. package/dist/typings/src/IdentityBindingAsk/index.d.ts +2 -0
  72. package/dist/typings/src/IdentityBindingAsk/interface.d.ts +21 -0
  73. package/dist/typings/src/ImagePro/index.d.ts +15 -0
  74. package/dist/typings/src/InputNumber/index.d.ts +5 -0
  75. package/dist/typings/src/InputPassword/index.d.ts +1 -0
  76. package/dist/typings/src/LazyloadImage/index.d.ts +12 -0
  77. package/dist/typings/src/Login/codemap.d.ts +2 -0
  78. package/dist/typings/src/Login/core/withAD.d.ts +20 -0
  79. package/dist/typings/src/Login/core/withAppQrcode.d.ts +8 -0
  80. package/dist/typings/src/Login/core/withAuthingOtpPush/BeforeLogin.d.ts +17 -0
  81. package/dist/typings/src/Login/core/withAuthingOtpPush/HowBindClient.d.ts +1 -0
  82. package/dist/typings/src/Login/core/withAuthingOtpPush/HowGetAppLoginUrl.d.ts +1 -0
  83. package/dist/typings/src/Login/core/withAuthingOtpPush/HowUsePushLogin.d.ts +1 -0
  84. package/dist/typings/src/Login/core/withAuthingOtpPush/PendingLogin.d.ts +6 -0
  85. package/dist/typings/src/Login/core/withAuthingOtpPush/PushLoginGuideModal.d.ts +2 -0
  86. package/dist/typings/src/Login/core/withAuthingOtpPush/PushLoginGuideSelector.d.ts +8 -0
  87. package/dist/typings/src/Login/core/withAuthingOtpPush/index.d.ts +2 -0
  88. package/dist/typings/src/Login/core/withAuthingOtpPush/types.d.ts +28 -0
  89. package/dist/typings/src/Login/core/withLDAP.d.ts +21 -0
  90. package/dist/typings/src/Login/core/withPassword/FormItemAccount.d.ts +6 -0
  91. package/dist/typings/src/Login/core/withPassword/GraphicVerifyCode.d.ts +7 -0
  92. package/dist/typings/src/Login/core/withPassword/InputAccount.d.ts +6 -0
  93. package/dist/typings/src/Login/core/withPassword/index.d.ts +27 -0
  94. package/dist/typings/src/Login/core/withVerifyCode/FormItemIdentify.d.ts +11 -0
  95. package/dist/typings/src/Login/core/withVerifyCode/InputInternationPhone.d.ts +7 -0
  96. package/dist/typings/src/Login/core/withVerifyCode/VirtualDropdown.d.ts +12 -0
  97. package/dist/typings/src/Login/core/withVerifyCode/index.d.ts +3 -0
  98. package/dist/typings/src/Login/core/withVerifyCode/inputIdentify.d.ts +7 -0
  99. package/dist/typings/src/Login/core/withWechatMiniQrcode.d.ts +10 -0
  100. package/dist/typings/src/Login/core/withWechatmpQrcode.d.ts +13 -0
  101. package/dist/typings/src/Login/hooks/useLoginMultiple.d.ts +64 -0
  102. package/dist/typings/src/Login/index.d.ts +5 -0
  103. package/dist/typings/src/Login/interface.d.ts +41 -0
  104. package/dist/typings/src/Login/multipleAccounts/index.d.ts +22 -0
  105. package/dist/typings/src/Login/multipleAccounts/panel.d.ts +46 -0
  106. package/dist/typings/src/Login/resetAccountName/businessRequest.d.ts +6 -0
  107. package/dist/typings/src/Login/resetAccountName/index.d.ts +3 -0
  108. package/dist/typings/src/Login/socialLogin/IdpButton/index.d.ts +1 -0
  109. package/dist/typings/src/Login/socialLogin/index.d.ts +18 -0
  110. package/dist/typings/src/Login/socialLogin/postMessage.d.ts +7 -0
  111. package/dist/typings/src/MFA/VerifyCodeInput/VerifyCodeFormItem.d.ts +8 -0
  112. package/dist/typings/src/MFA/VerifyCodeInput/index.d.ts +14 -0
  113. package/dist/typings/src/MFA/businessRequest.d.ts +46 -0
  114. package/dist/typings/src/MFA/codemap.d.ts +2 -0
  115. package/dist/typings/src/MFA/core/email.d.ts +23 -0
  116. package/dist/typings/src/MFA/core/face.d.ts +1 -0
  117. package/dist/typings/src/MFA/core/face_deps.d.ts +11 -0
  118. package/dist/typings/src/MFA/core/sms.d.ts +28 -0
  119. package/dist/typings/src/MFA/core/totp.d.ts +20 -0
  120. package/dist/typings/src/MFA/index.d.ts +9 -0
  121. package/dist/typings/src/MFA/interface.d.ts +43 -0
  122. package/dist/typings/src/MFA/mfaMethods/index.d.ts +8 -0
  123. package/dist/typings/src/NeedHelpView/core/describeQuestions.d.ts +7 -0
  124. package/dist/typings/src/NeedHelpView/index.d.ts +1 -0
  125. package/dist/typings/src/NewSubmitSuccess/index.d.ts +2 -0
  126. package/dist/typings/src/NewSubmitSuccess/interface.d.ts +19 -0
  127. package/dist/typings/src/Qrcode/UiQrCode.d.ts +51 -0
  128. package/dist/typings/src/Qrcode/WorkQrCode.d.ts +41 -0
  129. package/dist/typings/src/Qrcode/hooks/useImage.d.ts +4 -0
  130. package/dist/typings/src/Qrcode/hooks/usePostQrCode.d.ts +72 -0
  131. package/dist/typings/src/Qrcode/hooks/usePreQrCode.d.ts +31 -0
  132. package/dist/typings/src/Qrcode/hooks/useStatus.d.ts +8 -0
  133. package/dist/typings/src/Qrcode/index.d.ts +7 -0
  134. package/dist/typings/src/RecoveryCode/businessRequest.d.ts +5 -0
  135. package/dist/typings/src/RecoveryCode/core/saveCode.d.ts +5 -0
  136. package/dist/typings/src/RecoveryCode/core/useCode.d.ts +7 -0
  137. package/dist/typings/src/RecoveryCode/index.d.ts +5 -0
  138. package/dist/typings/src/RecoveryCode/interface.d.ts +8 -0
  139. package/dist/typings/src/Register/codemap.d.ts +2 -0
  140. package/dist/typings/src/Register/components/Agreements/index.d.ts +11 -0
  141. package/dist/typings/src/Register/core/WithCode.d.ts +17 -0
  142. package/dist/typings/src/Register/core/WithEmail.d.ts +13 -0
  143. package/dist/typings/src/Register/core/WithEmailCode.d.ts +11 -0
  144. package/dist/typings/src/Register/core/WithPhone.d.ts +10 -0
  145. package/dist/typings/src/Register/index.d.ts +2 -0
  146. package/dist/typings/src/Register/interface.d.ts +25 -0
  147. package/dist/typings/src/Register/utils.d.ts +1 -0
  148. package/dist/typings/src/SelectAccount/index.d.ts +2 -0
  149. package/dist/typings/src/SelfUnlock/core/selfUnlock.d.ts +8 -0
  150. package/dist/typings/src/SelfUnlock/index.d.ts +2 -0
  151. package/dist/typings/src/SelfUnlock/interface.d.ts +15 -0
  152. package/dist/typings/src/SendCode/SendCodeBtn.d.ts +10 -0
  153. package/dist/typings/src/SendCode/SendCodeByEmail.d.ts +13 -0
  154. package/dist/typings/src/SendCode/SendCodeByPhone.d.ts +17 -0
  155. package/dist/typings/src/SendCode/index.d.ts +9 -0
  156. package/dist/typings/src/ShieldSpin/index.d.ts +6 -0
  157. package/dist/typings/src/SingleComponent/SingleComponent.d.ts +2 -0
  158. package/dist/typings/src/SingleComponent/index.d.ts +3 -0
  159. package/dist/typings/src/SubmitButton/index.d.ts +10 -0
  160. package/dist/typings/src/SubmitSuccess/index.d.ts +2 -0
  161. package/dist/typings/src/SubmitSuccess/interface.d.ts +17 -0
  162. package/dist/typings/src/TenantPortalSelect/index.d.ts +2 -0
  163. package/dist/typings/src/TenantPortalSelect/interface.d.ts +32 -0
  164. package/dist/typings/src/Type/application.d.ts +339 -0
  165. package/dist/typings/src/Type/index.d.ts +86 -0
  166. package/dist/typings/src/UploadImage/index.d.ts +5 -0
  167. package/dist/typings/src/ValidatorRules/PasswordFormItem.d.ts +6 -0
  168. package/dist/typings/src/ValidatorRules/ValidatorFormItem.d.ts +8 -0
  169. package/dist/typings/src/ValidatorRules/index.d.ts +32 -0
  170. package/dist/typings/src/ValidatorRules/useCheckRepeat.d.ts +1 -0
  171. package/dist/typings/src/VerifyCodeInput/index.d.ts +10 -0
  172. package/dist/typings/src/_utils/GuardErrorCode.d.ts +11 -0
  173. package/dist/typings/src/_utils/appendConfig.d.ts +4 -0
  174. package/dist/typings/src/_utils/clipboard.d.ts +1 -0
  175. package/dist/typings/src/_utils/config/index.d.ts +110 -0
  176. package/dist/typings/src/_utils/context.d.ts +163 -0
  177. package/dist/typings/src/_utils/corsVerification.d.ts +1 -0
  178. package/dist/typings/src/_utils/countryList.d.ts +7 -0
  179. package/dist/typings/src/_utils/errorFace.d.ts +12 -0
  180. package/dist/typings/src/_utils/facePlugin/index.d.ts +4 -0
  181. package/dist/typings/src/_utils/facePlugin/interface.d.ts +5 -0
  182. package/dist/typings/src/_utils/flowHandleStorage.d.ts +4 -0
  183. package/dist/typings/src/_utils/getCaptchaUrl.d.ts +1 -0
  184. package/dist/typings/src/_utils/guardDocument.d.ts +3 -0
  185. package/dist/typings/src/_utils/guardHttp.d.ts +27 -0
  186. package/dist/typings/src/_utils/hooks/index.d.ts +43 -0
  187. package/dist/typings/src/_utils/http.d.ts +33 -0
  188. package/dist/typings/src/_utils/index.d.ts +119 -0
  189. package/dist/typings/src/_utils/initAppId.d.ts +7 -0
  190. package/dist/typings/src/_utils/locales/en-us/index.d.ts +4 -0
  191. package/dist/typings/src/_utils/locales/index.d.ts +9 -0
  192. package/dist/typings/src/_utils/locales/ja-jp/index.d.ts +4 -0
  193. package/dist/typings/src/_utils/locales/zh-cn/index.d.ts +4 -0
  194. package/dist/typings/src/_utils/locales/zh-tw/index.d.ts +4 -0
  195. package/dist/typings/src/_utils/logger/index.d.ts +15 -0
  196. package/dist/typings/src/_utils/logger/interface.d.ts +5 -0
  197. package/dist/typings/src/_utils/popupCenter.d.ts +9 -0
  198. package/dist/typings/src/_utils/responseManagement/index.d.ts +4 -0
  199. package/dist/typings/src/_utils/responseManagement/interface.d.ts +25 -0
  200. package/dist/typings/src/_utils/tenant.d.ts +19 -0
  201. package/dist/typings/src/_utils/useErrorText.d.ts +5 -0
  202. package/dist/typings/src/index.d.ts +51 -0
  203. package/dist/typings/src/types.d.ts +59 -0
  204. package/dist/typings/src/version/index.d.ts +2 -0
  205. package/dist/typings/src/version/version.d.ts +2 -0
  206. package/package.json +17 -0
@@ -0,0 +1,6 @@
1
+ interface IG2SpinProps {
2
+ size?: number;
3
+ }
4
+ export declare const ShieldSpin: (props: IG2SpinProps) => JSX.Element;
5
+ export declare const Spin: () => JSX.Element;
6
+ export {};
@@ -0,0 +1,2 @@
1
+ import { GuardModuleType, IG2FCProps } from '..';
2
+ export declare function SingleComponent<T extends IG2FCProps>(props: T, guardModuleType: GuardModuleType, initData?: any): JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { React } from 'shim-react';
2
+ import { GuardRegisterProps } from '../Register/interface';
3
+ export declare const Register: React.FC<GuardRegisterProps>;
@@ -0,0 +1,10 @@
1
+ import { React } from 'shim-react';
2
+ import { ButtonProps } from 'shim-antd/lib/button';
3
+ interface SubmitButtonProps extends ButtonProps {
4
+ text?: string;
5
+ className?: string;
6
+ onClick?: any;
7
+ disabled?: boolean;
8
+ }
9
+ declare const _default: React.ForwardRefExoticComponent<Pick<SubmitButtonProps, keyof SubmitButtonProps> & React.RefAttributes<unknown>>;
10
+ export default _default;
@@ -0,0 +1,2 @@
1
+ import { React } from 'shim-react';
2
+ export declare const GuardSubmitSuccessView: React.FC;
@@ -0,0 +1,17 @@
1
+ import { GuardModuleType } from '../Guard';
2
+ import { IG2Config, IG2Events, IG2FCViewProps } from '../Type';
3
+ export interface SubmitSuccessEvents extends IG2Events {
4
+ }
5
+ export interface SubmitSuccessConfig extends IG2Config {
6
+ }
7
+ export interface SubmitSuccessInitData {
8
+ title?: string;
9
+ message?: string;
10
+ text?: string;
11
+ countDesc?: string;
12
+ changeModule?: GuardModuleType;
13
+ }
14
+ export interface GuardSubmitSuccessViewProps extends IG2FCViewProps, SubmitSuccessEvents {
15
+ config: SubmitSuccessConfig;
16
+ initData?: SubmitSuccessInitData;
17
+ }
@@ -0,0 +1,2 @@
1
+ import './styles.less';
2
+ export declare const GuardTenantPortalSelectView: () => JSX.Element;
@@ -0,0 +1,32 @@
1
+ import { AvatarProps } from 'shim-antd/lib/avatar';
2
+ import { AuthenticationClient, IG2Events, User } from '../Type';
3
+ export interface TenantPortalListType {
4
+ tenantName: string;
5
+ tenantId: string;
6
+ tenantLogo: string;
7
+ host: string;
8
+ description: string;
9
+ /** 是否为用户池 */
10
+ isUserPool: boolean;
11
+ userName?: string;
12
+ }
13
+ export interface TenantPortalSelectType extends Omit<TenantPortalListType, 'userName'> {
14
+ }
15
+ /** 租户门户选择状态机返回数据类型 */
16
+ export interface TenantPortalDataType {
17
+ title: string;
18
+ description: string;
19
+ logo: string;
20
+ list: TenantPortalListType[];
21
+ }
22
+ export interface TenantPortalDataItem extends TenantPortalListType {
23
+ avatar?: AvatarProps;
24
+ extra?: React.ReactNode;
25
+ title?: string;
26
+ }
27
+ /** 租户门户相关事件 */
28
+ export interface TenantPortalEvents extends IG2Events {
29
+ onLogin?: (user: User, authClient: AuthenticationClient) => void;
30
+ /** 租户门户选择回调 */
31
+ onTenantSelect?: (data?: TenantPortalSelectType) => void;
32
+ }
@@ -0,0 +1,339 @@
1
+ import { Lang } from '..';
2
+ import { PasswordStrength } from '../_utils';
3
+ export * from 'authing-js-sdk';
4
+ export declare enum LoginMethods {
5
+ LDAP = "ldap",
6
+ AppQr = "app-qrcode",
7
+ Password = "password",
8
+ PhoneCode = "phone-code",
9
+ WxMinQr = "wechat-miniprogram-qrcode",
10
+ AD = "ad",
11
+ WechatMpQrcode = "wechatmp-qrcode",
12
+ AuthingOtpPush = "authing-otp-push"
13
+ }
14
+ export declare enum OIDCConnectionMode {
15
+ FRONT_CHANNEL = "FRONT_CHANNEL",
16
+ BACK_CHANNEL = "BACK_CHANNEL"
17
+ }
18
+ export declare enum SocialConnectionProvider {
19
+ ALIPAY = "alipay",
20
+ GOOGLE = "google",
21
+ WECHATPC = "wechat:pc",
22
+ WECHATMP = "wechat:webpage-authorization",
23
+ WECHAT_MINIPROGRAM = "wechat:miniprogram:default",
24
+ WECHAT_MINIPROGRAM_QRCODE = "wechat:miniprogram:qrconnect",
25
+ WECHAT_MINIPROGRAM_APPLAUNCH = "wechat:miniprogram:app-launch",
26
+ WECHATMOBILE = "wechat:mobile",
27
+ GITHUB = "github",
28
+ QQ = "qq",
29
+ WECHATWORK_ADDRESS_BOOK = "wechatwork:addressbook",
30
+ WECHATWORK_CORP_QRCONNECT = "wechatwork:corp:qrconnect",
31
+ WECHATWORK_SERVICEPROVIDER_QRCONNECT = "wechatwork:service-provider:qrconnect",
32
+ DINGTALK = "dingtalk",
33
+ WEIBO = "weibo",
34
+ APPLE = "apple",
35
+ APPLE_WEB = "apple:web",
36
+ LARK_PUBLIC = "lark-public",
37
+ LARK_INTERNAL = "lark-internal",
38
+ BAIDU = "baidu",
39
+ LINKEDIN = "linkedin",
40
+ SLACK = "slack",
41
+ YIDUN = "yidun",
42
+ QINGCLOUD = "qingcloud",
43
+ FACEBOOK = "facebook"
44
+ }
45
+ export declare enum Protocol {
46
+ AD = "ad",
47
+ CAS = "cas",
48
+ LDAP = "ldap",
49
+ OIDC = "oidc",
50
+ SAML = "saml",
51
+ OAUTH = "oauth",
52
+ AZURE_AD = "azure-ad",
53
+ AD_KERBEROS = "ad-kerberos"
54
+ }
55
+ export interface IOAuthConnectionConfig {
56
+ authEndPoint: string;
57
+ tokenEndPoint: string;
58
+ scope: string;
59
+ clientId: string;
60
+ clientSecret: string;
61
+ authUrlTemplate: string;
62
+ codeToTokenScript: string;
63
+ tokenToUserInfoScript: string;
64
+ tokenToUserInfoScriptFuncId: string;
65
+ codeToTokenScriptFuncId: string;
66
+ authUrl?: string;
67
+ }
68
+ export interface IAzureAdConnectionConfig {
69
+ microsoftAzureAdDomain: string;
70
+ clientId: string;
71
+ syncUserProfileOnLogin: string;
72
+ emailVerifiedDefault: boolean;
73
+ authorizationUrl: string;
74
+ callbackUrl: string;
75
+ }
76
+ export interface ISamlConnectionConfig {
77
+ signInEndPoint: string;
78
+ samlRequest?: string;
79
+ samlIdpCert: string;
80
+ samlSpCert: string;
81
+ samlSpKey: string;
82
+ signOutEndPoint: string;
83
+ signSamlRequest: boolean;
84
+ signatureAlgorithm: string;
85
+ digestAlgorithm: string;
86
+ protocolBinding: string;
87
+ }
88
+ export interface ICasConnectionConfig {
89
+ casConnectionLoginUrl: string;
90
+ }
91
+ export interface SocialConnectionItem {
92
+ name: string;
93
+ name_en: string;
94
+ displayName: string;
95
+ logo: string;
96
+ description: string;
97
+ identifier: string;
98
+ provider: SocialConnectionProvider;
99
+ authorizationUrl: string;
100
+ tooltip: Record<Lang, string>;
101
+ }
102
+ export declare enum RegisterMethods {
103
+ Email = "email",
104
+ Phone = "phone",
105
+ EmailCode = "emailCode"
106
+ }
107
+ export declare enum RegisterSortMethods {
108
+ Email = "email-password",
109
+ Phone = "phone-code",
110
+ EmailCode = "email-code"
111
+ }
112
+ export interface QrCodeItem {
113
+ id: string;
114
+ title: string;
115
+ isDefault?: boolean;
116
+ }
117
+ export declare type QrcodeTabsSettings = Record<LoginMethods, Array<QrCodeItem>>;
118
+ export interface OidcClientMetadata {
119
+ grant_types: string[];
120
+ client_id: string;
121
+ redirect_uris: string[];
122
+ scope: string;
123
+ response_types: ResponseType[];
124
+ }
125
+ export interface OIDCConnectionConfig {
126
+ issuerUrl: string;
127
+ authorizationEdpoint: string;
128
+ responseType: string;
129
+ mode: OIDCConnectionMode;
130
+ clientId: string;
131
+ clientSecret: string;
132
+ scopes: string;
133
+ redirectUri: string;
134
+ }
135
+ export interface InternalExtendsField {
136
+ type: 'internal';
137
+ name: string;
138
+ label: string;
139
+ inputType: string;
140
+ required: boolean;
141
+ validateRules: any[];
142
+ }
143
+ export interface UserExtendsField {
144
+ type: 'user';
145
+ id: string;
146
+ name: string;
147
+ label: string;
148
+ inputType: string;
149
+ required: boolean;
150
+ validateRules: any[];
151
+ }
152
+ export declare type ExtendsField = InternalExtendsField | UserExtendsField;
153
+ export interface ApplicationPasswordTabConfig {
154
+ enabledLoginMethods?: PasswordLoginMethods[];
155
+ validRegisterMethods?: string[];
156
+ validLoginMethods?: string[];
157
+ }
158
+ export interface ApplicationVerifyCodeTabConfig {
159
+ enabledLoginMethods: VerifyLoginMethods[];
160
+ validRegisterMethods?: string[];
161
+ validLoginMethods?: string[];
162
+ }
163
+ export interface Agreement {
164
+ id: number;
165
+ title: string;
166
+ required: boolean;
167
+ lang: Lang;
168
+ availableAt?: number;
169
+ }
170
+ export declare type PasswordLoginMethods = 'username-password' | 'email-password' | 'phone-password';
171
+ export declare type VerifyLoginMethods = 'email-code' | 'phone-code';
172
+ export declare type ComplateFiledsPlace = 'register' | 'login';
173
+ export interface TabFieldsI18nItem {
174
+ key: string;
175
+ label: string;
176
+ labelEn: string;
177
+ i18n: {
178
+ [propName in Lang]?: string;
179
+ };
180
+ }
181
+ interface LoginTypeI18nProps {
182
+ tab: {
183
+ default: string;
184
+ i18n: {
185
+ [propName: string]: string;
186
+ };
187
+ };
188
+ }
189
+ export interface ApplicationConfig {
190
+ id: string;
191
+ allowedOrigins: string[];
192
+ corsWhitelist: string[];
193
+ cdnBase: string;
194
+ userPoolId: string;
195
+ rootUserPoolId: string;
196
+ publicKey: string;
197
+ internationalSmsConfig?: {
198
+ enabled: boolean;
199
+ defaultISOType: string;
200
+ };
201
+ css: string;
202
+ customLoading?: string;
203
+ name: string;
204
+ logo: string;
205
+ description?: string;
206
+ redirectUris: string[];
207
+ registerDisabled: boolean;
208
+ mergeAdAndAccountPasswordLogin: boolean;
209
+ registerTabs: {
210
+ list: string[];
211
+ default: string;
212
+ title: {
213
+ [x: string]: string;
214
+ };
215
+ };
216
+ registerTabsConfig: {
217
+ list: string[];
218
+ default: string;
219
+ title: {
220
+ [x: string]: string;
221
+ };
222
+ registerTypeConfig: {
223
+ emailRegisterType?: RegisterMethods[];
224
+ phoneRegisterType?: RegisterMethods[];
225
+ };
226
+ };
227
+ qrcodeTabsSettings: QrcodeTabsSettings;
228
+ qrCodeSortConfig: {
229
+ loginMethodsSort?: string[];
230
+ };
231
+ loginTabs: {
232
+ list: string[];
233
+ default: string;
234
+ defaultV2?: string;
235
+ title: {
236
+ [x: string]: string;
237
+ };
238
+ };
239
+ socialConnections: SocialConnectionItem[];
240
+ complateFiledsPlace: ComplateFiledsPlace[];
241
+ extendsFieldsEnabled: boolean;
242
+ extendsFields: ExtendsField[];
243
+ extendsFieldsI18n?: {
244
+ [key: string]: Record<Lang, {
245
+ enabled: boolean;
246
+ value: string;
247
+ }>;
248
+ };
249
+ identifier: string;
250
+ requestHostname: string;
251
+ identityProviders: {
252
+ identifier: string;
253
+ protocol: Protocol;
254
+ displayName: string;
255
+ logo: string;
256
+ config: ISamlConnectionConfig | OIDCConnectionConfig | ICasConnectionConfig | IAzureAdConnectionConfig | IOAuthConnectionConfig;
257
+ }[];
258
+ ssoPageComponentDisplay: {
259
+ autoRegisterThenLoginHintInfo: boolean;
260
+ forgetPasswordBtn: boolean;
261
+ idpBtns: boolean;
262
+ loginBtn: boolean;
263
+ loginByPhoneCodeTab: boolean;
264
+ loginByUserPasswordTab: boolean;
265
+ loginMethodNav: boolean;
266
+ phoneCodeInput: boolean;
267
+ registerBtn: boolean;
268
+ registerByEmailTab: boolean;
269
+ registerByPhoneTab: boolean;
270
+ registerMethodNav: boolean;
271
+ socialLoginBtns: boolean;
272
+ userPasswordInput: boolean;
273
+ wxMpScanTab: boolean;
274
+ loginMethodsI18nDisplaySettings: {
275
+ password?: LoginTypeI18nProps;
276
+ verifyCode?: LoginTypeI18nProps;
277
+ ad?: LoginTypeI18nProps;
278
+ ldap?: LoginTypeI18nProps;
279
+ };
280
+ };
281
+ protocol: Protocol;
282
+ oidcConfig: OidcClientMetadata;
283
+ passwordTabConfig: ApplicationPasswordTabConfig;
284
+ verifyCodeTabConfig?: ApplicationVerifyCodeTabConfig;
285
+ agreementEnabled: boolean;
286
+ agreements: Agreement[];
287
+ customPasswordStrength: any;
288
+ passwordStrength: PasswordStrength;
289
+ verifyCodeLength: number;
290
+ websocket: string;
291
+ welcomeMessage: any;
292
+ skipComplateFileds: boolean;
293
+ selfUnlockStrategy: 'captcha' | 'password-captcha';
294
+ defaultLanguageConfig: Lang;
295
+ /**
296
+ * 是否开启账号切换
297
+ */
298
+ enableLoginAccountSwitch: boolean;
299
+ /**
300
+ * 是否开启注册密码补全
301
+ */
302
+ enableCompletePassword: boolean;
303
+ /**
304
+ * 登录注册排序
305
+ */
306
+ tabMethodsSortConfig: {
307
+ loginMethodsSort: string[];
308
+ };
309
+ tabMethodsFields: TabFieldsI18nItem[];
310
+ regexRules?: {
311
+ key: string;
312
+ appLevel: string;
313
+ userpoolLevel: string;
314
+ }[];
315
+ /** 是否为租户控制台应用 */
316
+ isTenantConsole?: boolean;
317
+ /** 是否默认为租户应用面板应用 */
318
+ isTenantDefault?: boolean;
319
+ /** 租户详情 */
320
+ tenantInfo?: Record<string, any>;
321
+ /** mfa 相关 */
322
+ mfa: {
323
+ faceScore: number;
324
+ };
325
+ authingOtpPushTabConfig: {
326
+ enabledLoginMethods: Array<string> | null;
327
+ validLoginMethods: Array<string> | null;
328
+ validRegisterMethods: Array<string> | null;
329
+ };
330
+ /** 是否开启自定义安全规则 */
331
+ customSecurityEnabled: boolean;
332
+ /** 应用的人机验证策略,始终开启、不开启、设置条件触发 */
333
+ appRobotVerify: 'always_enable' | 'disable' | 'condition_set';
334
+ /** 用户池的人机验证策略,始终开启、不开启、设置条件触发 */
335
+ userpoolRobotVerify: 'always_enable' | 'disable' | 'condition_set';
336
+ }
337
+ export interface IAuthingFunc {
338
+ (...args: any[]): any;
339
+ }
@@ -0,0 +1,86 @@
1
+ import { React } from 'shim-react';
2
+ import { AuthenticationClient, CommonMessage, User } from 'authing-js-sdk';
3
+ import { GuardModuleType } from '../Guard/module';
4
+ import { FacePlugin } from '../_utils/facePlugin/interface';
5
+ import { ApplicationConfig } from './application';
6
+ export * from './application';
7
+ export type { CommonMessage, User };
8
+ export declare type Lang = 'zh-CN' | 'en-US' | 'zh-TW' | 'ja-JP';
9
+ export declare enum GuardMode {
10
+ Modal = "modal",
11
+ Normal = "normal"
12
+ }
13
+ export interface IG2FCProps extends IG2Events {
14
+ appId?: string;
15
+ tenantId?: string;
16
+ config?: Partial<IG2Config>;
17
+ visible?: boolean;
18
+ initData?: any;
19
+ appendConfig?: GuardAppendConfig;
20
+ facePlugin?: FacePlugin;
21
+ authClient?: AuthenticationClient;
22
+ }
23
+ export interface GuardAppendConfig {
24
+ internalRequest?: boolean;
25
+ singleComponent?: boolean;
26
+ unAuthFlow?: boolean;
27
+ publicConfig?: ApplicationConfig;
28
+ pageConfig?: GuardPageConfig;
29
+ }
30
+ export interface IG2FCViewProps extends IG2FCProps {
31
+ config: IG2Config;
32
+ }
33
+ export interface IG2Config {
34
+ title?: string;
35
+ logo?: string;
36
+ lang?: string;
37
+ langRange?: Lang[];
38
+ host: string;
39
+ isHost?: boolean;
40
+ mode: GuardMode;
41
+ clickCloseable: boolean;
42
+ escCloseable: boolean;
43
+ userpool?: string;
44
+ contentCss?: string;
45
+ target?: HTMLElement | string;
46
+ style?: React.CSSProperties;
47
+ __internalRequest__?: boolean;
48
+ __singleComponent__?: boolean;
49
+ __unAuthFlow__?: boolean;
50
+ }
51
+ export interface IG2Events {
52
+ onLoad?: (authClient: AuthenticationClient) => void;
53
+ onLoadError?: (error: any) => void;
54
+ onClose?: () => void;
55
+ onLangChange?: (lang: Lang) => void;
56
+ __changeModule?: (moduleName: GuardModuleType, initData?: any) => void;
57
+ }
58
+ export declare const getDefaultG2Config: () => IG2Config;
59
+ export declare const LanguageMap: any;
60
+ export declare enum InputMethod {
61
+ EmailCode = "email-code",
62
+ PhoneCode = "phone-code"
63
+ }
64
+ export declare enum GuardPageSene {
65
+ Global = "global"
66
+ }
67
+ export interface GuardPageConfig {
68
+ [GuardPageSene.Global]: {
69
+ showChangeLanguage: boolean;
70
+ defaultLanguage: Lang | 'browser';
71
+ };
72
+ }
73
+ export declare enum EmailScene {
74
+ WELCOME_EMAIL = "WELCOME_EMAIL",
75
+ FIRST_CREATED_USER = "FIRST_CREATED_USER",
76
+ REGISTER_VERIFY_CODE = "REGISTER_VERIFY_CODE",
77
+ LOGIN_VERIFY_CODE = "LOGIN_VERIFY_CODE",
78
+ MFA_VERIFY_CODE = "MFA_VERIFY_CODE",
79
+ INFORMATION_COMPLETION_VERIFY_CODE = "INFORMATION_COMPLETION_VERIFY_CODE",
80
+ FIRST_EMAIL_LOGIN_VERIFY = "FIRST_EMAIL_LOGIN_VERIFY",
81
+ CONSOLE_CONDUCTED_VERIFY = "CONSOLE_CONDUCTED_VERIFY",
82
+ RESET_PASSWORD_VERIFY_CODE = "RESET_PASSWORD_VERIFY_CODE",
83
+ EMAIL_BIND_VERIFY_CODE = "EMAIL_BIND_VERIFY_CODE",
84
+ EMAIL_UNBIND_VERIFY_CODE = "EMAIL_UNBIND_VERIFY_CODE",
85
+ SELF_UNLOCKING_VERIFY_CODE = "SELF_UNLOCKING_VERIFY_CODE"
86
+ }
@@ -0,0 +1,5 @@
1
+ import { React } from 'shim-react';
2
+ export declare const UploadImage: React.FC<{
3
+ value?: string;
4
+ onChange?: (value: string) => void;
5
+ }>;
@@ -0,0 +1,6 @@
1
+ import { React } from 'shim-react';
2
+ import { PasswordFormItemProps } from '.';
3
+ export interface ExPasswordFormItemProps extends PasswordFormItemProps {
4
+ fieldRequiredRuleMessage?: string;
5
+ }
6
+ export declare const PasswordFormItem: React.FC<ExPasswordFormItemProps>;
@@ -0,0 +1,8 @@
1
+ import { React } from 'shim-react';
2
+ import { ValidatorFormItemProps } from '.';
3
+ export declare const EmailFormItem: React.FC<ValidatorFormItemProps>;
4
+ export declare const PhoneFormItem: React.FC<ValidatorFormItemProps>;
5
+ export declare const UserNameFormItem: React.FC<ValidatorFormItemProps>;
6
+ export declare const CustomNameFormItem: React.FC<ValidatorFormItemProps & {
7
+ method: string;
8
+ }>;
@@ -0,0 +1,32 @@
1
+ import { FormInstance } from 'shim-antd/lib/form';
2
+ import { Form, FormItemProps } from 'shim-antd';
3
+ import { PasswordFormItem } from './PasswordFormItem';
4
+ import { EmailFormItem, PhoneFormItem, UserNameFormItem, CustomNameFormItem } from './ValidatorFormItem';
5
+ export interface ValidatorFormItemProps extends FormItemProps {
6
+ form?: FormInstance;
7
+ checkRepeat?: boolean;
8
+ checkExist?: boolean;
9
+ areaCode?: string;
10
+ /**
11
+ * 控制内部FormItem组件关于pattern的校验规则
12
+ */
13
+ isCheckPattern?: boolean;
14
+ }
15
+ export interface ValidatorFormItemMetaProps extends ValidatorFormItemProps {
16
+ method: 'email' | 'phone' | 'username' | string;
17
+ }
18
+ export interface PasswordFormItemProps extends FormItemProps {
19
+ }
20
+ export interface ICheckProps {
21
+ check: (values: any) => void;
22
+ }
23
+ declare type InternalFormItemType = typeof Form.Item;
24
+ interface FormItemInterface extends InternalFormItemType {
25
+ Password: typeof PasswordFormItem;
26
+ Email: typeof EmailFormItem;
27
+ Phone: typeof PhoneFormItem;
28
+ UserName: typeof UserNameFormItem;
29
+ CustomName: typeof CustomNameFormItem;
30
+ }
31
+ declare const CustomFormItem: FormItemInterface;
32
+ export default CustomFormItem;
@@ -0,0 +1 @@
1
+ export declare const useCheckRepeat: (checkFn: (value: any, resolve: (value: unknown) => void, reject: (reason?: any) => void) => void) => (_: any, value: any) => Promise<unknown>;
@@ -0,0 +1,10 @@
1
+ import { React } from 'shim-react';
2
+ import './style.less';
3
+ interface VerifyCodeInputProps extends React.HTMLAttributes<HTMLDivElement> {
4
+ verifyCode: string[];
5
+ setVerifyCode: (code: string[]) => void;
6
+ length?: number;
7
+ onEnter?: Function;
8
+ }
9
+ export declare const VerifyCodeInput: React.FC<VerifyCodeInputProps>;
10
+ export {};
@@ -0,0 +1,11 @@
1
+ export declare enum ErrorCode {
2
+ OTP_MFA_CODE = 1635,
3
+ APP_MFA_CODE = 1636,
4
+ INPUT_CAPTCHACODE = 2000,
5
+ USER_EXISTENCE = 2026,
6
+ LOGIN_INVALID = 2021,
7
+ PASSWORD_ERROR = 2333,
8
+ USER_NOT_EXIST = 2004,
9
+ MULTIPLE_ERROR_LOCK = 2057,
10
+ ACCOUNT_LOCK = 2005
11
+ }
@@ -0,0 +1,4 @@
1
+ import { GuardAppendConfig } from '..';
2
+ export declare const getAppendConfig: () => GuardAppendConfig;
3
+ export declare const useAppendConfig: () => GuardAppendConfig;
4
+ export declare const initAppendConfig: (appendConfig?: GuardAppendConfig) => void;
@@ -0,0 +1 @@
1
+ export declare const copyToClipboard: (str: string) => void;