@pubinfo/core 2.2.0-beta.1 → 2.2.0-beta.3
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.
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
import { auth as request } from '../../request';
|
|
2
|
+
/**
|
|
3
|
+
* @description 双因素认证-二次认证准备
|
|
4
|
+
* @url /auth/2fa/prepare
|
|
5
|
+
* @method POST
|
|
6
|
+
* @author @pubinfo/openapi
|
|
7
|
+
*/
|
|
8
|
+
export declare function postAuth2FaPrepare<R = API.ResponseDataString, T = API.ResponseDataString>(body: API.Prepare2faDto, options?: Parameters<typeof request.Post<R, T>>[2]): import('alova').Method<import('alova').RespondedAlovaGenerics<import('../../../..').AG, R, T>>;
|
|
9
|
+
/**
|
|
10
|
+
* @description 双因素认证-二次认证验证
|
|
11
|
+
* @url /auth/2fa/verify
|
|
12
|
+
* @method POST
|
|
13
|
+
* @author @pubinfo/openapi
|
|
14
|
+
*/
|
|
15
|
+
export declare function postAuth2FaVerify<R = API.ResponseDataLoginTokenVo, T = API.ResponseDataLoginTokenVo>(body: API.Verify2faDto, options?: Parameters<typeof request.Post<R, T>>[2]): import('alova').Method<import('alova').RespondedAlovaGenerics<import('../../../..').AG, R, T>>;
|
|
2
16
|
/**
|
|
3
17
|
* @description 验证码-前端校验 需要校验的验证码类型:blockPuzzle、clickWord
|
|
4
18
|
* @url /auth/captcha/check
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pubinfo/core",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.2.0-beta.
|
|
4
|
+
"version": "2.2.0-beta.3",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
"pinia": "^3.0.4",
|
|
32
32
|
"vue": "^3.5.28",
|
|
33
33
|
"vue-router": "^5.0.2",
|
|
34
|
-
"@pubinfo/config": "2.2.0-beta.
|
|
35
|
-
"@pubinfo/
|
|
36
|
-
"@pubinfo/
|
|
34
|
+
"@pubinfo/config": "2.2.0-beta.3",
|
|
35
|
+
"@pubinfo/vite": "2.2.0-beta.3",
|
|
36
|
+
"@pubinfo/devtools": "2.2.0-beta.3"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@alova/adapter-axios": "^2.0.17",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"unctx": "^2.5.0",
|
|
64
64
|
"vue-m-message": "^4.0.2",
|
|
65
65
|
"zxcvbn": "^4.4.2",
|
|
66
|
-
"@pubinfo/shared": "2.2.0-beta.
|
|
66
|
+
"@pubinfo/shared": "2.2.0-beta.3"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"@alova/mock": "^2.0.18",
|
|
@@ -93,8 +93,8 @@
|
|
|
93
93
|
"vite-plugin-dts": "^4.5.4",
|
|
94
94
|
"vue": "^3.5.28",
|
|
95
95
|
"vue-router": "^5.0.2",
|
|
96
|
-
"@pubinfo/
|
|
97
|
-
"@pubinfo/
|
|
96
|
+
"@pubinfo/vite": "2.2.0-beta.3",
|
|
97
|
+
"@pubinfo/config": "2.2.0-beta.3"
|
|
98
98
|
},
|
|
99
99
|
"scripts": {
|
|
100
100
|
"dev": "vite build -w -m watch",
|
|
@@ -1,5 +1,41 @@
|
|
|
1
1
|
import { auth as request } from '@/features/api/request';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* @description 双因素认证-二次认证准备
|
|
5
|
+
* @url /auth/2fa/prepare
|
|
6
|
+
* @method POST
|
|
7
|
+
* @author @pubinfo/openapi
|
|
8
|
+
*/
|
|
9
|
+
export function postAuth2FaPrepare<
|
|
10
|
+
R = API.ResponseDataString,
|
|
11
|
+
T = API.ResponseDataString,
|
|
12
|
+
>(body: API.Prepare2faDto, options?: Parameters<typeof request.Post<R, T>>[2]) {
|
|
13
|
+
return request.Post<R, T>('/auth/2fa/prepare', body, {
|
|
14
|
+
headers: {
|
|
15
|
+
'Content-Type': 'application/json',
|
|
16
|
+
},
|
|
17
|
+
...(options || {}),
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @description 双因素认证-二次认证验证
|
|
23
|
+
* @url /auth/2fa/verify
|
|
24
|
+
* @method POST
|
|
25
|
+
* @author @pubinfo/openapi
|
|
26
|
+
*/
|
|
27
|
+
export function postAuth2FaVerify<
|
|
28
|
+
R = API.ResponseDataLoginTokenVo,
|
|
29
|
+
T = API.ResponseDataLoginTokenVo,
|
|
30
|
+
>(body: API.Verify2faDto, options?: Parameters<typeof request.Post<R, T>>[2]) {
|
|
31
|
+
return request.Post<R, T>('/auth/2fa/verify', body, {
|
|
32
|
+
headers: {
|
|
33
|
+
'Content-Type': 'application/json',
|
|
34
|
+
},
|
|
35
|
+
...(options || {}),
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
|
|
3
39
|
/**
|
|
4
40
|
* @description 验证码-前端校验 需要校验的验证码类型:blockPuzzle、clickWord
|
|
5
41
|
* @url /auth/captcha/check
|
|
@@ -40,9 +40,9 @@ declare namespace API {
|
|
|
40
40
|
};
|
|
41
41
|
|
|
42
42
|
type IResponseCode = {
|
|
43
|
-
msg?: string;
|
|
44
43
|
code?: number;
|
|
45
44
|
hint?: string;
|
|
45
|
+
msg?: string;
|
|
46
46
|
};
|
|
47
47
|
|
|
48
48
|
type LoginByPwdCaptchaDto = {
|
|
@@ -79,6 +79,8 @@ declare namespace API {
|
|
|
79
79
|
/** 访问令牌 */
|
|
80
80
|
accessToken?: string;
|
|
81
81
|
loginResponse?: IResponseCode;
|
|
82
|
+
/** 2FA登录码 不为空表示开启了2FA登录 */
|
|
83
|
+
login2faCode?: string;
|
|
82
84
|
};
|
|
83
85
|
|
|
84
86
|
type postAuthChangeLoginOrgParams = {
|
|
@@ -103,6 +105,13 @@ declare namespace API {
|
|
|
103
105
|
refreshToken: string;
|
|
104
106
|
};
|
|
105
107
|
|
|
108
|
+
type Prepare2faDto = {
|
|
109
|
+
/** login2faCode */
|
|
110
|
+
login2faCode: string;
|
|
111
|
+
/** 二次认证方式 默认支持sms */
|
|
112
|
+
fa2Type: string;
|
|
113
|
+
};
|
|
114
|
+
|
|
106
115
|
type PubLoginTokenVo = {
|
|
107
116
|
/** id */
|
|
108
117
|
id?: string;
|
|
@@ -174,4 +183,13 @@ declare namespace API {
|
|
|
174
183
|
key?: string;
|
|
175
184
|
plaintext?: string;
|
|
176
185
|
};
|
|
186
|
+
|
|
187
|
+
type Verify2faDto = {
|
|
188
|
+
/** login2faCode */
|
|
189
|
+
login2faCode: string;
|
|
190
|
+
/** 二次认证方式 默认支持sms */
|
|
191
|
+
fa2Type: string;
|
|
192
|
+
/** 认证码 */
|
|
193
|
+
verifyCode: string;
|
|
194
|
+
};
|
|
177
195
|
}
|