@nocobase/plugin-auth 2.1.0-alpha.40 → 2.1.0-alpha.45
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/client/{443.634aca1f12f4906b.js → 443.aa711879b4855b88.js} +1 -1
- package/dist/client/index.js +1 -1
- package/dist/client-v2/{217.67ac4fe4bbc76329.js → 217.09744ff679406aff.js} +1 -1
- package/dist/client-v2/657.2a9dcca9ddc31ec0.js +10 -0
- package/dist/client-v2/{795.6fbe6abacb03f9a6.js → 795.b26178560fd03daa.js} +1 -1
- package/dist/client-v2/{841.83e6cab5e9918668.js → 841.ac9bfbb0615510e5.js} +1 -1
- package/dist/client-v2/{9.e88efa64328b39d7.js → 9.5301763a7da120fa.js} +1 -1
- package/dist/client-v2/index.js +1 -1
- package/dist/client-v2/locale.d.ts +0 -170
- package/dist/client-v2/pages/TokenPolicyPage.d.ts +32 -0
- package/dist/client-v2/plugin.d.ts +3 -11
- package/dist/externalVersion.js +11 -11
- package/dist/node_modules/cron/package.json +1 -1
- package/dist/node_modules/ms/package.json +1 -1
- package/dist/server/collections/issued-tokens.js +5 -0
- package/dist/server/plugin.d.ts +2 -0
- package/dist/server/plugin.js +2 -0
- package/dist/server/token-controller.d.ts +3 -1
- package/dist/server/token-controller.js +3 -2
- package/package.json +2 -2
|
@@ -26,14 +26,16 @@ export declare class TokenController implements TokenControlService {
|
|
|
26
26
|
getConfig(): Promise<NumericTokenPolicyConfig>;
|
|
27
27
|
setConfig(config: TokenPolicyConfig): Promise<void>;
|
|
28
28
|
removeSessionExpiredTokens(userId: number): Promise<number>;
|
|
29
|
-
add({ userId }: {
|
|
29
|
+
add({ userId, authenticator }: {
|
|
30
30
|
userId: number;
|
|
31
|
+
authenticator?: string;
|
|
31
32
|
}): Promise<{
|
|
32
33
|
jti: `${string}-${string}-${string}-${string}-${string}`;
|
|
33
34
|
issuedTime: number;
|
|
34
35
|
signInTime: number;
|
|
35
36
|
renewed: boolean;
|
|
36
37
|
userId: number;
|
|
38
|
+
authenticator: string;
|
|
37
39
|
}>;
|
|
38
40
|
renew: TokenControlService['renew'];
|
|
39
41
|
}
|
|
@@ -93,7 +93,7 @@ class TokenController {
|
|
|
93
93
|
}
|
|
94
94
|
});
|
|
95
95
|
}
|
|
96
|
-
async add({ userId }) {
|
|
96
|
+
async add({ userId, authenticator }) {
|
|
97
97
|
const jti = (0, import_crypto.randomUUID)();
|
|
98
98
|
const currTS = Date.now();
|
|
99
99
|
const data = {
|
|
@@ -101,7 +101,8 @@ class TokenController {
|
|
|
101
101
|
issuedTime: currTS,
|
|
102
102
|
signInTime: currTS,
|
|
103
103
|
renewed: false,
|
|
104
|
-
userId
|
|
104
|
+
userId,
|
|
105
|
+
authenticator
|
|
105
106
|
};
|
|
106
107
|
await this.setTokenInfo(jti, data);
|
|
107
108
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/plugin-auth",
|
|
3
|
-
"version": "2.1.0-alpha.
|
|
3
|
+
"version": "2.1.0-alpha.45",
|
|
4
4
|
"main": "./dist/server/index.js",
|
|
5
5
|
"homepage": "https://docs.nocobase.com/handbook/auth",
|
|
6
6
|
"homepage.ru-RU": "https://docs-ru.nocobase.com/handbook/auth",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"description": "User authentication management, including password, SMS, and support for Single Sign-On (SSO) protocols, with extensibility.",
|
|
32
32
|
"description.ru-RU": "Управление аутентификацией пользователей: пароли, SMS, поддержка протоколов единого входа (SSO) и возможность расширения.",
|
|
33
33
|
"description.zh-CN": "用户认证管理,包括基础的密码认证、短信认证、SSO 协议的认证等,可扩展。",
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "e9e24987e12d0ad10a5db8815b1e1b7b447f1938",
|
|
35
35
|
"keywords": [
|
|
36
36
|
"Authentication",
|
|
37
37
|
"Security"
|