@liujitcn/kratos-admin-core 0.0.28 → 0.0.31
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/README.md +7 -6
- package/build/auto-imports.json +73 -0
- package/build/plugins.ts +2 -58
- package/dist/package/declarations/src/api/base/mfa.d.ts +26 -0
- package/dist/package/declarations/src/components/Dialog/FormDialog.vue.d.ts +3 -3
- package/dist/package/declarations/src/components/Dialog/PasswordVerifyDialog.vue.d.ts +65 -0
- package/dist/package/declarations/src/components/Dialog/ProDialog.vue.d.ts +1 -1
- package/dist/package/declarations/src/components/Grid/components/GridItem.vue.d.ts +1 -1
- package/dist/package/declarations/src/components/Mfa/MfaRecoveryCodesDialog.vue.d.ts +19 -0
- package/dist/package/declarations/src/components/Mfa/MfaSetupPanel.vue.d.ts +8 -0
- package/dist/package/declarations/src/components/ProForm/components/ProFormItem.vue.d.ts +4 -4
- package/dist/package/declarations/src/components/ProForm/index.vue.d.ts +1 -1
- package/dist/package/declarations/src/components/ProForm/interface/index.d.ts +4 -1
- package/dist/package/declarations/src/components/RichTextPreview/index.vue.d.ts +8 -0
- package/dist/package/declarations/src/components/Upload/Img.vue.d.ts +1 -1
- package/dist/package/declarations/src/components/Upload/Imgs.vue.d.ts +1 -1
- package/dist/package/declarations/src/layouts/components/LockScreen.vue.d.ts +3 -0
- package/dist/package/declarations/src/locales/generated.d.ts +168 -0
- package/dist/package/declarations/src/locales/index.d.ts +2 -0
- package/dist/package/declarations/src/rpc/base/v1/login.d.ts +33 -3
- package/dist/package/declarations/src/rpc/base/v1/mfa.d.ts +152 -0
- package/dist/package/declarations/src/rpc/base/v1/oauth.d.ts +25 -0
- package/dist/package/declarations/src/rpc/base/v1/oauth_client.d.ts +23 -0
- package/dist/package/declarations/src/rpc/system/admin/v1/base_dict.d.ts +4 -4
- package/dist/package/declarations/src/rpc/system/admin/v1/base_i18n.d.ts +27 -23
- package/dist/package/declarations/src/security.d.ts +2 -0
- package/dist/package/declarations/src/stores/interface/index.d.ts +14 -1
- package/dist/package/declarations/src/stores/modules/lockScreen.d.ts +20 -0
- package/dist/package/declarations/src/stores/modules/user.d.ts +5 -2
- package/dist/package/declarations/src/stores/runtime.d.ts +1 -0
- package/dist/package/declarations/src/utils/clipboard.d.ts +2 -0
- package/dist/package/declarations/src/utils/webauthn.d.ts +4 -0
- package/dist/package/declarations/vite.config.d.ts +2 -0
- package/dist/package/src/api/base/mfa.ts +114 -0
- package/dist/package/src/components/Dialog/PasswordVerifyDialog.vue +176 -0
- package/dist/package/src/components/Loading/fullScreen.ts +2 -1
- package/dist/package/src/components/MarkdownPreview/index.vue +21 -1
- package/dist/package/src/components/Mfa/MfaRecoveryCodesDialog.vue +91 -0
- package/dist/package/src/components/Mfa/MfaSetupPanel.vue +81 -0
- package/dist/package/src/components/ProForm/components/ProFormItem.vue +16 -1
- package/dist/package/src/components/ProForm/interface/index.ts +4 -0
- package/dist/package/src/components/ProTable/components/ColSetting.vue +1 -1
- package/dist/package/src/components/ProTable/index.vue +6 -2
- package/dist/package/src/components/RichTextPreview/index.vue +45 -0
- package/dist/package/src/config/index.ts +1 -1
- package/dist/package/src/layouts/LayoutClassic/index.vue +3 -1
- package/dist/package/src/layouts/LayoutColumns/index.vue +3 -1
- package/dist/package/src/layouts/LayoutTransverse/index.vue +3 -1
- package/dist/package/src/layouts/LayoutVertical/index.vue +9 -1
- package/dist/package/src/layouts/components/Header/components/Avatar.vue +23 -4
- package/dist/package/src/layouts/components/Header/components/InfoDialog.vue +1 -1
- package/dist/package/src/layouts/components/Header/components/PasswordDialog.vue +1 -1
- package/dist/package/src/layouts/components/LockScreen.vue +450 -0
- package/dist/package/src/layouts/index.vue +2 -0
- package/dist/package/src/layouts/indexAsync.vue +2 -0
- package/dist/package/src/locales/README.md +2 -1
- package/dist/package/src/locales/en-US.json +43 -1
- package/dist/package/src/locales/index.ts +16 -12
- package/dist/package/src/locales/ja-JP.json +43 -1
- package/dist/package/src/locales/zh-CN.json +43 -1
- package/dist/package/src/locales/zh-TW.json +43 -1
- package/dist/package/src/rpc/base/v1/login.ts +33 -2
- package/dist/package/src/rpc/base/v1/mfa.ts +180 -0
- package/dist/package/src/rpc/base/v1/oauth.ts +25 -0
- package/dist/package/src/rpc/base/v1/oauth_client.ts +33 -0
- package/dist/package/src/rpc/system/admin/v1/base_dict.ts +4 -4
- package/dist/package/src/rpc/system/admin/v1/base_i18n.ts +27 -23
- package/dist/package/src/security.ts +2 -0
- package/dist/package/src/stores/interface/index.ts +15 -1
- package/dist/package/src/stores/modules/config.ts +4 -4
- package/dist/package/src/stores/modules/lockScreen.ts +78 -0
- package/dist/package/src/stores/modules/user.ts +16 -3
- package/dist/package/src/stores/runtime.ts +1 -0
- package/dist/package/src/utils/clipboard.ts +22 -0
- package/dist/package/src/utils/request.ts +26 -10
- package/dist/package/src/utils/webauthn.ts +90 -0
- package/dist/package/src/views/login/components/LoginForm.vue +237 -16
- package/dist/package/src/views/login/index.vue +3 -1
- package/dist/package/types/generated/auto-imports.d.ts +132 -129
- package/dist/package/types/generated/components.d.ts +4 -72
- package/package.json +22 -1
- package/types/generated/auto-imports.d.ts +132 -129
- package/types/generated/components.d.ts +4 -72
- package/vite.config.ts +3 -1
|
@@ -52,6 +52,15 @@ export declare const LOCALE_MESSAGES: {
|
|
|
52
52
|
"core.auth.no_menu_permission": string;
|
|
53
53
|
"core.auth.no_permission": string;
|
|
54
54
|
"core.clipboard.success": string;
|
|
55
|
+
"core.markdown.action.copy_code": string;
|
|
56
|
+
"core.markdown.message.copy_success": string;
|
|
57
|
+
"core.markdown.message.copy_failed": string;
|
|
58
|
+
"core.loading.text": string;
|
|
59
|
+
"core.layout.avatar": string;
|
|
60
|
+
"core.layout.logo_alt": string;
|
|
61
|
+
"core.login.background_alt": string;
|
|
62
|
+
"core.layout.info_content": string;
|
|
63
|
+
"core.layout.password_content": string;
|
|
55
64
|
"core.cron.cycle_unit.day": string;
|
|
56
65
|
"core.cron.cycle_unit.hour": string;
|
|
57
66
|
"core.cron.cycle_unit.minute": string;
|
|
@@ -140,6 +149,14 @@ export declare const LOCALE_MESSAGES: {
|
|
|
140
149
|
"core.layout.info": string;
|
|
141
150
|
"core.layout.password_change": string;
|
|
142
151
|
"core.layout.unnamed_menu": string;
|
|
152
|
+
"core.layout.lock_screen": string;
|
|
153
|
+
"core.layout.lock_screen_action": string;
|
|
154
|
+
"core.layout.lock_screen_password_placeholder": string;
|
|
155
|
+
"core.layout.lock_screen_password_required": string;
|
|
156
|
+
"core.layout.lock_screen_password_invalid": string;
|
|
157
|
+
"core.layout.lock_screen_unlock_hint": string;
|
|
158
|
+
"core.layout.lock_screen_enter": string;
|
|
159
|
+
"core.layout.lock_screen_return_login": string;
|
|
143
160
|
"core.layout.logout_confirm": string;
|
|
144
161
|
"core.layout.logout_success": string;
|
|
145
162
|
"core.layout.not_set": string;
|
|
@@ -160,6 +177,25 @@ export declare const LOCALE_MESSAGES: {
|
|
|
160
177
|
"core.login.tenant_code": string;
|
|
161
178
|
"core.login.user_name": string;
|
|
162
179
|
"core.login.welcome": string;
|
|
180
|
+
"core.login.mfa_title": string;
|
|
181
|
+
"core.login.mfa_code": string;
|
|
182
|
+
"core.login.mfa_recovery_code": string;
|
|
183
|
+
"core.login.mfa_setup_title": string;
|
|
184
|
+
"core.login.mfa_setup_qr_alt": string;
|
|
185
|
+
"core.login.mfa_uri_copied": string;
|
|
186
|
+
"core.login.mfa_show_uri": string;
|
|
187
|
+
"core.login.mfa_copy_uri": string;
|
|
188
|
+
"core.login.mfa_recovery_codes_title": string;
|
|
189
|
+
"core.login.mfa_recovery_codes_warning": string;
|
|
190
|
+
"core.login.mfa_recovery_codes_copied": string;
|
|
191
|
+
"core.login.mfa_copy_recovery_codes": string;
|
|
192
|
+
"core.login.mfa_recovery_codes_confirm": string;
|
|
193
|
+
"core.login.mfa_setup_success": string;
|
|
194
|
+
"core.login.mfa_webauthn_action": string;
|
|
195
|
+
"core.login.mfa_webauthn_setup_unsupported": string;
|
|
196
|
+
"core.login.mfa_webauthn_setup_invalid": string;
|
|
197
|
+
"core.login.mfa_webauthn_login_unsupported": string;
|
|
198
|
+
"core.login.mfa_webauthn_login_invalid": string;
|
|
163
199
|
"core.oauth.dingtalk": string;
|
|
164
200
|
"core.oauth.feishu": string;
|
|
165
201
|
"core.oauth.wechat": string;
|
|
@@ -169,6 +205,8 @@ export declare const LOCALE_MESSAGES: {
|
|
|
169
205
|
"core.password.error": string;
|
|
170
206
|
"core.password.crypto_unsupported": string;
|
|
171
207
|
"core.password.required": string;
|
|
208
|
+
"core.password.verify_title": string;
|
|
209
|
+
"core.password.verify_label": string;
|
|
172
210
|
"core.password.strength": string;
|
|
173
211
|
"core.password.strength.empty": string;
|
|
174
212
|
"core.password.strength.high": string;
|
|
@@ -282,6 +320,10 @@ export declare const LOCALE_MESSAGES: {
|
|
|
282
320
|
"common.value.no": string;
|
|
283
321
|
"common.value.unknown": string;
|
|
284
322
|
"common.value.none": string;
|
|
323
|
+
"common.value.top_level": string;
|
|
324
|
+
"common.resource.default": string;
|
|
325
|
+
"common.action.delete_resource": string;
|
|
326
|
+
"common.action.set_field_status": string;
|
|
285
327
|
};
|
|
286
328
|
readonly "en-US": {
|
|
287
329
|
"common.action.back": string;
|
|
@@ -332,6 +374,15 @@ export declare const LOCALE_MESSAGES: {
|
|
|
332
374
|
"core.auth.no_menu_permission": string;
|
|
333
375
|
"core.auth.no_permission": string;
|
|
334
376
|
"core.clipboard.success": string;
|
|
377
|
+
"core.markdown.action.copy_code": string;
|
|
378
|
+
"core.markdown.message.copy_success": string;
|
|
379
|
+
"core.markdown.message.copy_failed": string;
|
|
380
|
+
"core.loading.text": string;
|
|
381
|
+
"core.layout.avatar": string;
|
|
382
|
+
"core.layout.logo_alt": string;
|
|
383
|
+
"core.login.background_alt": string;
|
|
384
|
+
"core.layout.info_content": string;
|
|
385
|
+
"core.layout.password_content": string;
|
|
335
386
|
"core.cron.cycle_unit.day": string;
|
|
336
387
|
"core.cron.cycle_unit.hour": string;
|
|
337
388
|
"core.cron.cycle_unit.minute": string;
|
|
@@ -420,6 +471,14 @@ export declare const LOCALE_MESSAGES: {
|
|
|
420
471
|
"core.layout.info": string;
|
|
421
472
|
"core.layout.password_change": string;
|
|
422
473
|
"core.layout.unnamed_menu": string;
|
|
474
|
+
"core.layout.lock_screen": string;
|
|
475
|
+
"core.layout.lock_screen_action": string;
|
|
476
|
+
"core.layout.lock_screen_password_placeholder": string;
|
|
477
|
+
"core.layout.lock_screen_password_required": string;
|
|
478
|
+
"core.layout.lock_screen_password_invalid": string;
|
|
479
|
+
"core.layout.lock_screen_unlock_hint": string;
|
|
480
|
+
"core.layout.lock_screen_enter": string;
|
|
481
|
+
"core.layout.lock_screen_return_login": string;
|
|
423
482
|
"core.layout.logout_confirm": string;
|
|
424
483
|
"core.layout.logout_success": string;
|
|
425
484
|
"core.layout.not_set": string;
|
|
@@ -440,6 +499,25 @@ export declare const LOCALE_MESSAGES: {
|
|
|
440
499
|
"core.login.tenant_code": string;
|
|
441
500
|
"core.login.user_name": string;
|
|
442
501
|
"core.login.welcome": string;
|
|
502
|
+
"core.login.mfa_title": string;
|
|
503
|
+
"core.login.mfa_code": string;
|
|
504
|
+
"core.login.mfa_recovery_code": string;
|
|
505
|
+
"core.login.mfa_setup_title": string;
|
|
506
|
+
"core.login.mfa_setup_qr_alt": string;
|
|
507
|
+
"core.login.mfa_uri_copied": string;
|
|
508
|
+
"core.login.mfa_show_uri": string;
|
|
509
|
+
"core.login.mfa_copy_uri": string;
|
|
510
|
+
"core.login.mfa_recovery_codes_title": string;
|
|
511
|
+
"core.login.mfa_recovery_codes_warning": string;
|
|
512
|
+
"core.login.mfa_recovery_codes_copied": string;
|
|
513
|
+
"core.login.mfa_copy_recovery_codes": string;
|
|
514
|
+
"core.login.mfa_recovery_codes_confirm": string;
|
|
515
|
+
"core.login.mfa_setup_success": string;
|
|
516
|
+
"core.login.mfa_webauthn_action": string;
|
|
517
|
+
"core.login.mfa_webauthn_setup_unsupported": string;
|
|
518
|
+
"core.login.mfa_webauthn_setup_invalid": string;
|
|
519
|
+
"core.login.mfa_webauthn_login_unsupported": string;
|
|
520
|
+
"core.login.mfa_webauthn_login_invalid": string;
|
|
443
521
|
"core.oauth.dingtalk": string;
|
|
444
522
|
"core.oauth.feishu": string;
|
|
445
523
|
"core.oauth.wechat": string;
|
|
@@ -449,6 +527,8 @@ export declare const LOCALE_MESSAGES: {
|
|
|
449
527
|
"core.password.error": string;
|
|
450
528
|
"core.password.crypto_unsupported": string;
|
|
451
529
|
"core.password.required": string;
|
|
530
|
+
"core.password.verify_title": string;
|
|
531
|
+
"core.password.verify_label": string;
|
|
452
532
|
"core.password.strength": string;
|
|
453
533
|
"core.password.strength.empty": string;
|
|
454
534
|
"core.password.strength.high": string;
|
|
@@ -562,6 +642,10 @@ export declare const LOCALE_MESSAGES: {
|
|
|
562
642
|
"common.value.no": string;
|
|
563
643
|
"common.value.unknown": string;
|
|
564
644
|
"common.value.none": string;
|
|
645
|
+
"common.value.top_level": string;
|
|
646
|
+
"common.resource.default": string;
|
|
647
|
+
"common.action.delete_resource": string;
|
|
648
|
+
"common.action.set_field_status": string;
|
|
565
649
|
};
|
|
566
650
|
readonly "ja-JP": {
|
|
567
651
|
"common.action.back": string;
|
|
@@ -612,6 +696,34 @@ export declare const LOCALE_MESSAGES: {
|
|
|
612
696
|
"core.auth.no_menu_permission": string;
|
|
613
697
|
"core.auth.no_permission": string;
|
|
614
698
|
"core.clipboard.success": string;
|
|
699
|
+
"core.markdown.action.copy_code": string;
|
|
700
|
+
"core.markdown.message.copy_success": string;
|
|
701
|
+
"core.markdown.message.copy_failed": string;
|
|
702
|
+
"core.loading.text": string;
|
|
703
|
+
"core.layout.avatar": string;
|
|
704
|
+
"core.layout.logo_alt": string;
|
|
705
|
+
"core.login.background_alt": string;
|
|
706
|
+
"core.login.mfa_title": string;
|
|
707
|
+
"core.login.mfa_code": string;
|
|
708
|
+
"core.login.mfa_recovery_code": string;
|
|
709
|
+
"core.login.mfa_setup_title": string;
|
|
710
|
+
"core.login.mfa_setup_qr_alt": string;
|
|
711
|
+
"core.login.mfa_uri_copied": string;
|
|
712
|
+
"core.login.mfa_show_uri": string;
|
|
713
|
+
"core.login.mfa_copy_uri": string;
|
|
714
|
+
"core.login.mfa_recovery_codes_title": string;
|
|
715
|
+
"core.login.mfa_recovery_codes_warning": string;
|
|
716
|
+
"core.login.mfa_recovery_codes_copied": string;
|
|
717
|
+
"core.login.mfa_copy_recovery_codes": string;
|
|
718
|
+
"core.login.mfa_recovery_codes_confirm": string;
|
|
719
|
+
"core.login.mfa_setup_success": string;
|
|
720
|
+
"core.login.mfa_webauthn_action": string;
|
|
721
|
+
"core.login.mfa_webauthn_setup_unsupported": string;
|
|
722
|
+
"core.login.mfa_webauthn_setup_invalid": string;
|
|
723
|
+
"core.login.mfa_webauthn_login_unsupported": string;
|
|
724
|
+
"core.login.mfa_webauthn_login_invalid": string;
|
|
725
|
+
"core.layout.info_content": string;
|
|
726
|
+
"core.layout.password_content": string;
|
|
615
727
|
"core.cron.cycle_unit.day": string;
|
|
616
728
|
"core.cron.cycle_unit.hour": string;
|
|
617
729
|
"core.cron.cycle_unit.minute": string;
|
|
@@ -700,6 +812,14 @@ export declare const LOCALE_MESSAGES: {
|
|
|
700
812
|
"core.layout.info": string;
|
|
701
813
|
"core.layout.password_change": string;
|
|
702
814
|
"core.layout.unnamed_menu": string;
|
|
815
|
+
"core.layout.lock_screen": string;
|
|
816
|
+
"core.layout.lock_screen_action": string;
|
|
817
|
+
"core.layout.lock_screen_password_placeholder": string;
|
|
818
|
+
"core.layout.lock_screen_password_required": string;
|
|
819
|
+
"core.layout.lock_screen_password_invalid": string;
|
|
820
|
+
"core.layout.lock_screen_unlock_hint": string;
|
|
821
|
+
"core.layout.lock_screen_enter": string;
|
|
822
|
+
"core.layout.lock_screen_return_login": string;
|
|
703
823
|
"core.layout.logout_confirm": string;
|
|
704
824
|
"core.layout.logout_success": string;
|
|
705
825
|
"core.layout.not_set": string;
|
|
@@ -729,6 +849,8 @@ export declare const LOCALE_MESSAGES: {
|
|
|
729
849
|
"core.password.error": string;
|
|
730
850
|
"core.password.crypto_unsupported": string;
|
|
731
851
|
"core.password.required": string;
|
|
852
|
+
"core.password.verify_title": string;
|
|
853
|
+
"core.password.verify_label": string;
|
|
732
854
|
"core.password.strength": string;
|
|
733
855
|
"core.password.strength.empty": string;
|
|
734
856
|
"core.password.strength.high": string;
|
|
@@ -842,6 +964,10 @@ export declare const LOCALE_MESSAGES: {
|
|
|
842
964
|
"common.value.no": string;
|
|
843
965
|
"common.value.unknown": string;
|
|
844
966
|
"common.value.none": string;
|
|
967
|
+
"common.value.top_level": string;
|
|
968
|
+
"common.resource.default": string;
|
|
969
|
+
"common.action.delete_resource": string;
|
|
970
|
+
"common.action.set_field_status": string;
|
|
845
971
|
};
|
|
846
972
|
readonly "zh-TW": {
|
|
847
973
|
"common.action.back": string;
|
|
@@ -892,6 +1018,34 @@ export declare const LOCALE_MESSAGES: {
|
|
|
892
1018
|
"core.auth.no_menu_permission": string;
|
|
893
1019
|
"core.auth.no_permission": string;
|
|
894
1020
|
"core.clipboard.success": string;
|
|
1021
|
+
"core.markdown.action.copy_code": string;
|
|
1022
|
+
"core.markdown.message.copy_success": string;
|
|
1023
|
+
"core.markdown.message.copy_failed": string;
|
|
1024
|
+
"core.loading.text": string;
|
|
1025
|
+
"core.layout.avatar": string;
|
|
1026
|
+
"core.layout.logo_alt": string;
|
|
1027
|
+
"core.login.background_alt": string;
|
|
1028
|
+
"core.login.mfa_title": string;
|
|
1029
|
+
"core.login.mfa_code": string;
|
|
1030
|
+
"core.login.mfa_recovery_code": string;
|
|
1031
|
+
"core.login.mfa_setup_title": string;
|
|
1032
|
+
"core.login.mfa_setup_qr_alt": string;
|
|
1033
|
+
"core.login.mfa_uri_copied": string;
|
|
1034
|
+
"core.login.mfa_show_uri": string;
|
|
1035
|
+
"core.login.mfa_copy_uri": string;
|
|
1036
|
+
"core.login.mfa_recovery_codes_title": string;
|
|
1037
|
+
"core.login.mfa_recovery_codes_warning": string;
|
|
1038
|
+
"core.login.mfa_recovery_codes_copied": string;
|
|
1039
|
+
"core.login.mfa_copy_recovery_codes": string;
|
|
1040
|
+
"core.login.mfa_recovery_codes_confirm": string;
|
|
1041
|
+
"core.login.mfa_setup_success": string;
|
|
1042
|
+
"core.login.mfa_webauthn_action": string;
|
|
1043
|
+
"core.login.mfa_webauthn_setup_unsupported": string;
|
|
1044
|
+
"core.login.mfa_webauthn_setup_invalid": string;
|
|
1045
|
+
"core.login.mfa_webauthn_login_unsupported": string;
|
|
1046
|
+
"core.login.mfa_webauthn_login_invalid": string;
|
|
1047
|
+
"core.layout.info_content": string;
|
|
1048
|
+
"core.layout.password_content": string;
|
|
895
1049
|
"core.cron.cycle_unit.day": string;
|
|
896
1050
|
"core.cron.cycle_unit.hour": string;
|
|
897
1051
|
"core.cron.cycle_unit.minute": string;
|
|
@@ -980,6 +1134,14 @@ export declare const LOCALE_MESSAGES: {
|
|
|
980
1134
|
"core.layout.info": string;
|
|
981
1135
|
"core.layout.password_change": string;
|
|
982
1136
|
"core.layout.unnamed_menu": string;
|
|
1137
|
+
"core.layout.lock_screen": string;
|
|
1138
|
+
"core.layout.lock_screen_action": string;
|
|
1139
|
+
"core.layout.lock_screen_password_placeholder": string;
|
|
1140
|
+
"core.layout.lock_screen_password_required": string;
|
|
1141
|
+
"core.layout.lock_screen_password_invalid": string;
|
|
1142
|
+
"core.layout.lock_screen_unlock_hint": string;
|
|
1143
|
+
"core.layout.lock_screen_enter": string;
|
|
1144
|
+
"core.layout.lock_screen_return_login": string;
|
|
983
1145
|
"core.layout.logout_confirm": string;
|
|
984
1146
|
"core.layout.logout_success": string;
|
|
985
1147
|
"core.layout.not_set": string;
|
|
@@ -1009,6 +1171,8 @@ export declare const LOCALE_MESSAGES: {
|
|
|
1009
1171
|
"core.password.error": string;
|
|
1010
1172
|
"core.password.crypto_unsupported": string;
|
|
1011
1173
|
"core.password.required": string;
|
|
1174
|
+
"core.password.verify_title": string;
|
|
1175
|
+
"core.password.verify_label": string;
|
|
1012
1176
|
"core.password.strength": string;
|
|
1013
1177
|
"core.password.strength.empty": string;
|
|
1014
1178
|
"core.password.strength.high": string;
|
|
@@ -1122,6 +1286,10 @@ export declare const LOCALE_MESSAGES: {
|
|
|
1122
1286
|
"common.value.no": string;
|
|
1123
1287
|
"common.value.unknown": string;
|
|
1124
1288
|
"common.value.none": string;
|
|
1289
|
+
"common.value.top_level": string;
|
|
1290
|
+
"common.resource.default": string;
|
|
1291
|
+
"common.action.delete_resource": string;
|
|
1292
|
+
"common.action.set_field_status": string;
|
|
1125
1293
|
};
|
|
1126
1294
|
};
|
|
1127
1295
|
export type GeneratedLocale = keyof typeof LOCALE_MESSAGES;
|
|
@@ -42,6 +42,8 @@ export declare function setCurrentLocale(value: SupportedLocale): Promise<void>;
|
|
|
42
42
|
export declare function registerLocaleChangeHandler(handler: () => void | Promise<void>): () => void;
|
|
43
43
|
/** 在非组件代码中翻译稳定语言键。 */
|
|
44
44
|
export declare function t(key: string, params?: LocaleParams): string;
|
|
45
|
+
/** 从指定语言包读取固定文案,供第三方组件配置和跨语言兼容判断使用。 */
|
|
46
|
+
export declare function getLocaleText(locale: SupportedLocale, key: string): string;
|
|
45
47
|
/** 管理端响应式语言状态。 */
|
|
46
48
|
export declare function useLocaleStore(): {
|
|
47
49
|
locale: Readonly<globalThis.Ref<"zh-CN" | "en-US" | "ja-JP" | "zh-TW", "zh-CN" | "en-US" | "ja-JP" | "zh-TW">>;
|
|
@@ -11,7 +11,25 @@ export declare enum PasswordCryptoScene {
|
|
|
11
11
|
/** PASSWORD_CRYPTO_SCENE_RESET_BASE_USER_PASSWORD - 重置后台用户密码加密场景。 */
|
|
12
12
|
PASSWORD_CRYPTO_SCENE_RESET_BASE_USER_PASSWORD = 3,
|
|
13
13
|
/** PASSWORD_CRYPTO_SCENE_UPDATE_USER_PASSWORD - 个人修改密码加密场景。 */
|
|
14
|
-
PASSWORD_CRYPTO_SCENE_UPDATE_USER_PASSWORD = 4
|
|
14
|
+
PASSWORD_CRYPTO_SCENE_UPDATE_USER_PASSWORD = 4,
|
|
15
|
+
/** PASSWORD_CRYPTO_SCENE_MFA - 多因素认证敏感操作场景。 */
|
|
16
|
+
PASSWORD_CRYPTO_SCENE_MFA = 5
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* LoginStatus 表示登录请求当前所处的认证阶段。
|
|
20
|
+
* 只有 AUTHENTICATED 或 PASSWORD_CHANGE_REQUIRED 才会携带正式访问令牌,MFA 状态必须继续完成挑战。
|
|
21
|
+
*/
|
|
22
|
+
export declare enum LoginStatus {
|
|
23
|
+
/** LOGIN_STATUS_UNSPECIFIED - 未指定登录状态。 */
|
|
24
|
+
LOGIN_STATUS_UNSPECIFIED = 0,
|
|
25
|
+
/** LOGIN_STATUS_AUTHENTICATED - 已完成认证并签发令牌。 */
|
|
26
|
+
LOGIN_STATUS_AUTHENTICATED = 1,
|
|
27
|
+
/** LOGIN_STATUS_MFA_REQUIRED - 需要继续校验多因素认证。 */
|
|
28
|
+
LOGIN_STATUS_MFA_REQUIRED = 2,
|
|
29
|
+
/** LOGIN_STATUS_MFA_ENROLLMENT_REQUIRED - 必须先完成多因素认证绑定。 */
|
|
30
|
+
LOGIN_STATUS_MFA_ENROLLMENT_REQUIRED = 3,
|
|
31
|
+
/** LOGIN_STATUS_PASSWORD_CHANGE_REQUIRED - 下次操作前必须修改临时密码。 */
|
|
32
|
+
LOGIN_STATUS_PASSWORD_CHANGE_REQUIRED = 4
|
|
15
33
|
}
|
|
16
34
|
/** 验证码获取条件 */
|
|
17
35
|
export interface CaptchaRequest {
|
|
@@ -64,8 +82,8 @@ export interface PasswordPublicKeyResponse {
|
|
|
64
82
|
}
|
|
65
83
|
/** 刷新令牌请求参数 */
|
|
66
84
|
export interface RefreshTokenRequest {
|
|
67
|
-
/**
|
|
68
|
-
refresh_token
|
|
85
|
+
/** 更新令牌;未填写时由服务端从HttpOnly Cookie读取。 */
|
|
86
|
+
refresh_token?: string | undefined;
|
|
69
87
|
}
|
|
70
88
|
/** 刷新令牌响应 */
|
|
71
89
|
export interface RefreshTokenResponse {
|
|
@@ -101,6 +119,18 @@ export interface LoginResponse {
|
|
|
101
119
|
token_type: string;
|
|
102
120
|
/** 令牌有效时间,单位为秒。如果访问令牌过期,服务器应回复授予访问令牌的持续时间。如果省略该参数,必须其他方式设置过期时间。 */
|
|
103
121
|
expires_in: number;
|
|
122
|
+
/** 登录认证状态 */
|
|
123
|
+
status: LoginStatus;
|
|
124
|
+
/** 多因素认证挑战ID */
|
|
125
|
+
mfa_challenge_id: string;
|
|
126
|
+
/** 多因素认证绑定临时票据 */
|
|
127
|
+
mfa_setup_ticket: string;
|
|
128
|
+
/** 多因素认证挑战或绑定票据有效时间,单位秒 */
|
|
129
|
+
mfa_expires_in: number;
|
|
130
|
+
/** 多因素认证方式:totp、webauthn */
|
|
131
|
+
mfa_method: string;
|
|
132
|
+
/** WebAuthn认证选项JSON */
|
|
133
|
+
mfa_webauthn_options_json: string;
|
|
104
134
|
}
|
|
105
135
|
/** Base登录公共服务 */
|
|
106
136
|
export interface LoginService {
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import type { PasswordCrypto } from "../../common/v1/types";
|
|
2
|
+
import type { Empty } from "../../google/protobuf/empty";
|
|
3
|
+
import type { LoginResponse } from "./login";
|
|
4
|
+
/** 多因素认证校验请求。 */
|
|
5
|
+
export interface VerifyMfaRequest {
|
|
6
|
+
/** 多因素认证挑战ID */
|
|
7
|
+
challenge_id: string;
|
|
8
|
+
/** TOTP动态口令 */
|
|
9
|
+
code: string;
|
|
10
|
+
/** 一次性恢复码 */
|
|
11
|
+
recovery_code: string;
|
|
12
|
+
/** WebAuthn认证响应JSON */
|
|
13
|
+
webauthn_response_json: string;
|
|
14
|
+
}
|
|
15
|
+
/** 登录强制绑定多因素认证请求。 */
|
|
16
|
+
export interface BeginMfaEnrollmentRequest {
|
|
17
|
+
/** 强制绑定临时票据 */
|
|
18
|
+
setup_ticket: string;
|
|
19
|
+
}
|
|
20
|
+
/** 登录强制绑定多因素认证响应。 */
|
|
21
|
+
export interface BeginMfaEnrollmentResponse {
|
|
22
|
+
/** 绑定临时票据 */
|
|
23
|
+
setup_ticket: string;
|
|
24
|
+
/** Authenticator应用使用的otpauth地址 */
|
|
25
|
+
otpauth_uri: string;
|
|
26
|
+
/** 绑定临时票据有效时间,单位秒 */
|
|
27
|
+
expires_in: number;
|
|
28
|
+
/** 多因素认证方式:totp、webauthn */
|
|
29
|
+
method: string;
|
|
30
|
+
/** WebAuthn注册选项JSON */
|
|
31
|
+
webauthn_options_json: string;
|
|
32
|
+
}
|
|
33
|
+
/** 登录强制绑定多因素认证确认请求。 */
|
|
34
|
+
export interface ConfirmMfaEnrollmentRequest {
|
|
35
|
+
/** 绑定临时票据 */
|
|
36
|
+
setup_ticket: string;
|
|
37
|
+
/** TOTP动态口令 */
|
|
38
|
+
code: string;
|
|
39
|
+
/** WebAuthn注册响应JSON */
|
|
40
|
+
webauthn_response_json: string;
|
|
41
|
+
}
|
|
42
|
+
/** 登录强制绑定多因素认证确认响应。 */
|
|
43
|
+
export interface ConfirmMfaEnrollmentResponse {
|
|
44
|
+
/** 是否启用成功 */
|
|
45
|
+
enabled: boolean;
|
|
46
|
+
/** 一次性恢复码,仅本次返回 */
|
|
47
|
+
recovery_codes: string[];
|
|
48
|
+
}
|
|
49
|
+
/** 查询当前用户多因素认证状态请求。 */
|
|
50
|
+
export interface GetMfaStatusRequest {
|
|
51
|
+
}
|
|
52
|
+
/** 多因素认证状态响应。 */
|
|
53
|
+
export interface MfaStatusResponse {
|
|
54
|
+
/** 是否已启用多因素认证 */
|
|
55
|
+
enabled: boolean;
|
|
56
|
+
/** 全局多因素认证策略 */
|
|
57
|
+
policy: string;
|
|
58
|
+
/** 认证方式 */
|
|
59
|
+
method: string;
|
|
60
|
+
}
|
|
61
|
+
/** 开始绑定多因素认证请求。 */
|
|
62
|
+
export interface BeginMfaSetupRequest {
|
|
63
|
+
/** 当前登录密码 */
|
|
64
|
+
password: PasswordCrypto | undefined;
|
|
65
|
+
/** 强制绑定场景下的临时票据 */
|
|
66
|
+
setup_ticket: string;
|
|
67
|
+
}
|
|
68
|
+
/** 开始绑定多因素认证响应。 */
|
|
69
|
+
export interface BeginMfaSetupResponse {
|
|
70
|
+
/** 绑定临时票据 */
|
|
71
|
+
setup_ticket: string;
|
|
72
|
+
/** Authenticator 应用使用的 otpauth 地址 */
|
|
73
|
+
otpauth_uri: string;
|
|
74
|
+
/** 绑定临时票据有效时间,单位秒 */
|
|
75
|
+
expires_in: number;
|
|
76
|
+
/** 多因素认证方式:totp、webauthn */
|
|
77
|
+
method: string;
|
|
78
|
+
/** WebAuthn 注册选项 JSON */
|
|
79
|
+
webauthn_options_json: string;
|
|
80
|
+
}
|
|
81
|
+
/** 确认绑定多因素认证请求。 */
|
|
82
|
+
export interface ConfirmMfaSetupRequest {
|
|
83
|
+
/** 绑定临时票据 */
|
|
84
|
+
setup_ticket: string;
|
|
85
|
+
/** TOTP 动态口令 */
|
|
86
|
+
code: string;
|
|
87
|
+
/** WebAuthn 注册响应 JSON */
|
|
88
|
+
webauthn_response_json: string;
|
|
89
|
+
}
|
|
90
|
+
/** 确认绑定多因素认证响应。 */
|
|
91
|
+
export interface ConfirmMfaSetupResponse {
|
|
92
|
+
/** 是否启用成功 */
|
|
93
|
+
enabled: boolean;
|
|
94
|
+
/** 一次性恢复码,仅本次返回 */
|
|
95
|
+
recovery_codes: string[];
|
|
96
|
+
}
|
|
97
|
+
/** 开始禁用 WebAuthn 多因素认证请求。 */
|
|
98
|
+
export interface BeginMfaDisableRequest {
|
|
99
|
+
}
|
|
100
|
+
/** 开始禁用 WebAuthn 多因素认证响应。 */
|
|
101
|
+
export interface BeginMfaDisableResponse {
|
|
102
|
+
/** WebAuthn 禁用挑战 ID */
|
|
103
|
+
challenge_id: string;
|
|
104
|
+
/** WebAuthn 禁用挑战有效时间,单位秒 */
|
|
105
|
+
expires_in: number;
|
|
106
|
+
/** WebAuthn 验证选项 JSON */
|
|
107
|
+
webauthn_options_json: string;
|
|
108
|
+
}
|
|
109
|
+
/** 禁用多因素认证请求。 */
|
|
110
|
+
export interface DisableMfaRequest {
|
|
111
|
+
/** 当前登录密码 */
|
|
112
|
+
password: PasswordCrypto | undefined;
|
|
113
|
+
/** TOTP 动态口令 */
|
|
114
|
+
code: string;
|
|
115
|
+
/** WebAuthn 禁用挑战 ID */
|
|
116
|
+
webauthn_challenge_id: string;
|
|
117
|
+
/** WebAuthn 验证响应 JSON */
|
|
118
|
+
webauthn_response_json: string;
|
|
119
|
+
/** 一次性恢复码 */
|
|
120
|
+
recovery_code: string;
|
|
121
|
+
}
|
|
122
|
+
/** 重新生成恢复码请求。 */
|
|
123
|
+
export interface RegenerateMfaRecoveryCodesRequest {
|
|
124
|
+
/** TOTP 动态口令 */
|
|
125
|
+
code: string;
|
|
126
|
+
}
|
|
127
|
+
/** 恢复码响应。 */
|
|
128
|
+
export interface RecoveryCodesResponse {
|
|
129
|
+
/** 一次性恢复码,仅本次返回 */
|
|
130
|
+
recovery_codes: string[];
|
|
131
|
+
}
|
|
132
|
+
/** Base 多因素认证公共服务。 */
|
|
133
|
+
export interface MfaService {
|
|
134
|
+
/** 校验多因素认证 */
|
|
135
|
+
VerifyMfa(request: VerifyMfaRequest): Promise<LoginResponse>;
|
|
136
|
+
/** 开始登录强制绑定配置的 MFA 方式 */
|
|
137
|
+
BeginMfaEnrollment(request: BeginMfaEnrollmentRequest): Promise<BeginMfaEnrollmentResponse>;
|
|
138
|
+
/** 确认登录强制绑定配置的 MFA 方式 */
|
|
139
|
+
ConfirmMfaEnrollment(request: ConfirmMfaEnrollmentRequest): Promise<ConfirmMfaEnrollmentResponse>;
|
|
140
|
+
/** 查询当前用户多因素认证状态。 */
|
|
141
|
+
GetMfaStatus(request: GetMfaStatusRequest): Promise<MfaStatusResponse>;
|
|
142
|
+
/** 开始绑定当前用户的多因素认证方式。 */
|
|
143
|
+
BeginMfaSetup(request: BeginMfaSetupRequest): Promise<BeginMfaSetupResponse>;
|
|
144
|
+
/** 确认绑定当前用户的多因素认证方式。 */
|
|
145
|
+
ConfirmMfaSetup(request: ConfirmMfaSetupRequest): Promise<ConfirmMfaSetupResponse>;
|
|
146
|
+
/** 开始禁用 WebAuthn 多因素认证的 Passkey 验证。 */
|
|
147
|
+
BeginMfaDisable(request: BeginMfaDisableRequest): Promise<BeginMfaDisableResponse>;
|
|
148
|
+
/** 禁用当前用户的多因素认证。 */
|
|
149
|
+
DisableMfa(request: DisableMfaRequest): Promise<Empty>;
|
|
150
|
+
/** 重新生成当前用户的多因素认证恢复码。 */
|
|
151
|
+
RegenerateMfaRecoveryCodes(request: RegenerateMfaRecoveryCodesRequest): Promise<RecoveryCodesResponse>;
|
|
152
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { PasswordCrypto } from "../../common/v1/types";
|
|
2
2
|
import type { Empty } from "../../google/protobuf/empty";
|
|
3
|
+
import type { LoginStatus } from "./login";
|
|
3
4
|
/** 个人中心三方账号绑定列表查询条件 */
|
|
4
5
|
export interface ListOauthBindingRequest {
|
|
5
6
|
}
|
|
@@ -76,6 +77,18 @@ export interface CreateOauthSessionResponse {
|
|
|
76
77
|
expires_in: number;
|
|
77
78
|
/** 是否需要绑定已有账号。 */
|
|
78
79
|
binding_required: boolean;
|
|
80
|
+
/** 登录认证状态 */
|
|
81
|
+
status: LoginStatus;
|
|
82
|
+
/** 多因素认证挑战ID */
|
|
83
|
+
mfa_challenge_id: string;
|
|
84
|
+
/** 多因素认证绑定临时票据 */
|
|
85
|
+
mfa_setup_ticket: string;
|
|
86
|
+
/** 多因素认证挑战或绑定票据有效时间,单位秒 */
|
|
87
|
+
mfa_expires_in: number;
|
|
88
|
+
/** 多因素认证方式:totp、webauthn */
|
|
89
|
+
mfa_method: string;
|
|
90
|
+
/** WebAuthn认证选项JSON */
|
|
91
|
+
mfa_webauthn_options_json: string;
|
|
79
92
|
}
|
|
80
93
|
/** 三方登录回调请求 */
|
|
81
94
|
export interface HandleOauthCallbackRequest {
|
|
@@ -108,6 +121,18 @@ export interface ExchangeOauthTicketResponse {
|
|
|
108
121
|
token_type: string;
|
|
109
122
|
/** 令牌有效时间,单位为秒。 */
|
|
110
123
|
expires_in: number;
|
|
124
|
+
/** 登录认证状态 */
|
|
125
|
+
status: LoginStatus;
|
|
126
|
+
/** 多因素认证挑战ID */
|
|
127
|
+
mfa_challenge_id: string;
|
|
128
|
+
/** 多因素认证绑定临时票据 */
|
|
129
|
+
mfa_setup_ticket: string;
|
|
130
|
+
/** 多因素认证挑战或绑定票据有效时间,单位秒 */
|
|
131
|
+
mfa_expires_in: number;
|
|
132
|
+
/** 多因素认证方式:totp、webauthn */
|
|
133
|
+
mfa_method: string;
|
|
134
|
+
/** WebAuthn认证选项JSON */
|
|
135
|
+
mfa_webauthn_options_json: string;
|
|
111
136
|
}
|
|
112
137
|
/** 个人中心三方账号绑定回调请求 */
|
|
113
138
|
export interface HandleOauthBindingCallbackRequest {
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** 客户端凭据令牌请求。 */
|
|
2
|
+
export interface IssueOauthClientTokenRequest {
|
|
3
|
+
/** 客户端标识 */
|
|
4
|
+
client_id: string;
|
|
5
|
+
/** 客户端密钥 */
|
|
6
|
+
client_secret: string;
|
|
7
|
+
/** 授权类型 */
|
|
8
|
+
grant_type: string;
|
|
9
|
+
}
|
|
10
|
+
/** 客户端凭据令牌响应。 */
|
|
11
|
+
export interface IssueOauthClientTokenResponse {
|
|
12
|
+
/** 访问令牌 */
|
|
13
|
+
access_token: string;
|
|
14
|
+
/** 令牌类型 */
|
|
15
|
+
token_type: string;
|
|
16
|
+
/** 令牌有效时间,单位为秒 */
|
|
17
|
+
expires_in: number;
|
|
18
|
+
}
|
|
19
|
+
/** 开放授权客户端令牌服务。 */
|
|
20
|
+
export interface OauthClientService {
|
|
21
|
+
/** 使用客户端凭据换取访问令牌。 */
|
|
22
|
+
IssueOauthClientToken(request: IssueOauthClientTokenRequest): Promise<IssueOauthClientTokenResponse>;
|
|
23
|
+
}
|
|
@@ -81,7 +81,7 @@ export interface BaseDictForm {
|
|
|
81
81
|
/** 字典名称 */
|
|
82
82
|
name: string;
|
|
83
83
|
/** 非主语言翻译 */
|
|
84
|
-
|
|
84
|
+
i18ns: BaseI18n[];
|
|
85
85
|
/** 状态 */
|
|
86
86
|
status: Status;
|
|
87
87
|
}
|
|
@@ -105,7 +105,7 @@ export interface BaseDictItemForm {
|
|
|
105
105
|
/** 排序 */
|
|
106
106
|
sort: number;
|
|
107
107
|
/** 非主语言翻译 */
|
|
108
|
-
|
|
108
|
+
i18ns: BaseI18n[];
|
|
109
109
|
/** 状态 */
|
|
110
110
|
status: Status;
|
|
111
111
|
}
|
|
@@ -168,7 +168,7 @@ export interface BaseDict {
|
|
|
168
168
|
/** 更新时间 */
|
|
169
169
|
updated_at: string;
|
|
170
170
|
/** 非主语言翻译 */
|
|
171
|
-
|
|
171
|
+
i18ns: BaseI18n[];
|
|
172
172
|
}
|
|
173
173
|
/** 字典项 */
|
|
174
174
|
export interface BaseDictItem {
|
|
@@ -191,7 +191,7 @@ export interface BaseDictItem {
|
|
|
191
191
|
/** 更新时间 */
|
|
192
192
|
updated_at: string;
|
|
193
193
|
/** 非主语言翻译 */
|
|
194
|
-
|
|
194
|
+
i18ns: BaseI18n[];
|
|
195
195
|
}
|
|
196
196
|
/** Admin字典服务 */
|
|
197
197
|
export interface BaseDictService {
|