@nocobase/plugin-auth 0.18.0-alpha.9 → 0.19.0-alpha.10
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/externalVersion.js +9 -9
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -1
- package/dist/locale/ko_KR.json +26 -0
- package/dist/node_modules/cron/package.json +1 -1
- package/dist/server/collections/authenticators.d.ts +1 -2
- package/dist/server/collections/authenticators.js +7 -5
- package/dist/server/collections/token-blacklist.d.ts +1 -2
- package/dist/server/collections/token-blacklist.js +7 -4
- package/dist/server/collections/users-authenticators.d.ts +1 -2
- package/dist/server/collections/users-authenticators.js +6 -10
- package/dist/server/index.d.ts +2 -1
- package/dist/server/index.js +5 -2
- package/dist/server/migrations/20230506152253-basic-authenticator.d.ts +1 -0
- package/dist/server/migrations/20230506152253-basic-authenticator.js +1 -18
- package/dist/server/migrations/20230607174500-update-basic.d.ts +1 -0
- package/dist/server/migrations/20230607174500-update-basic.js +1 -0
- package/dist/server/migrations/20231218132032-fix-allow-signup.d.ts +1 -0
- package/dist/server/migrations/20231218132032-fix-allow-signup.js +1 -0
- package/dist/server/plugin.js +1 -3
- package/package.json +9 -4
package/dist/externalVersion.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
"@nocobase/client": "0.
|
|
2
|
+
"@nocobase/client": "0.19.0-alpha.10",
|
|
3
3
|
"react": "18.2.0",
|
|
4
4
|
"react-router-dom": "6.21.0",
|
|
5
|
-
"@nocobase/utils": "0.
|
|
6
|
-
"@nocobase/auth": "0.
|
|
7
|
-
"@nocobase/database": "0.
|
|
8
|
-
"@nocobase/server": "0.
|
|
9
|
-
"@nocobase/cache": "0.
|
|
10
|
-
"@nocobase/test": "0.
|
|
11
|
-
"antd": "5.12.
|
|
5
|
+
"@nocobase/utils": "0.19.0-alpha.10",
|
|
6
|
+
"@nocobase/auth": "0.19.0-alpha.10",
|
|
7
|
+
"@nocobase/database": "0.19.0-alpha.10",
|
|
8
|
+
"@nocobase/server": "0.19.0-alpha.10",
|
|
9
|
+
"@nocobase/cache": "0.19.0-alpha.10",
|
|
10
|
+
"@nocobase/test": "0.19.0-alpha.10",
|
|
11
|
+
"antd": "5.12.8",
|
|
12
12
|
"@formily/react": "2.3.0",
|
|
13
13
|
"@formily/shared": "2.3.0",
|
|
14
14
|
"react-i18next": "11.18.6",
|
|
15
15
|
"@emotion/css": "11.11.2",
|
|
16
16
|
"@ant-design/icons": "5.2.6",
|
|
17
|
-
"@nocobase/actions": "0.
|
|
17
|
+
"@nocobase/actions": "0.19.0-alpha.10"
|
|
18
18
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { AuthModel, BasicAuth, default } from './server';
|
package/dist/index.js
CHANGED
|
@@ -28,11 +28,13 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
28
28
|
var src_exports = {};
|
|
29
29
|
__export(src_exports, {
|
|
30
30
|
AuthModel: () => import_server.AuthModel,
|
|
31
|
+
BasicAuth: () => import_server.BasicAuth,
|
|
31
32
|
default: () => import_server.default
|
|
32
33
|
});
|
|
33
34
|
module.exports = __toCommonJS(src_exports);
|
|
34
35
|
var import_server = __toESM(require("./server"));
|
|
35
36
|
// Annotate the CommonJS export names for ESM import in node:
|
|
36
37
|
0 && (module.exports = {
|
|
37
|
-
AuthModel
|
|
38
|
+
AuthModel,
|
|
39
|
+
BasicAuth
|
|
38
40
|
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Auth Type": "인증 유형",
|
|
3
|
+
"Authenticators": "인증기",
|
|
4
|
+
"Authentication": "인증",
|
|
5
|
+
"Sign in via email": "이메일로 로그인",
|
|
6
|
+
"Sign in via password": "비밀번호로 로그인",
|
|
7
|
+
"Not allowed to sign up": "가입할 수 없음",
|
|
8
|
+
"Allow to sign up": "가입 허용",
|
|
9
|
+
"The username or email is incorrect, please re-enter": "사용자 이름 또는 이메일이 잘못되었습니다. 다시 입력하세요.",
|
|
10
|
+
"The password is incorrect, please re-enter": "비밀번호가 잘못되었습니다. 다시 입력하세요.",
|
|
11
|
+
"Not a valid cellphone number, please re-enter": "유효하지 않은 휴대폰 번호입니다. 다시 입력하세요.",
|
|
12
|
+
"The phone number has been registered, please login directly": "전화번호가 이미 등록되어 있습니다. 직접 로그인하세요.",
|
|
13
|
+
"The phone number is not registered, please register first": "전화번호가 등록되어 있지 않습니다. 먼저 등록하세요.",
|
|
14
|
+
"Please keep and enable at least one authenticator": "최소한 하나의 인증기를 유지하고 활성화하세요.",
|
|
15
|
+
"Allow to sign in with": "다음으로 로그인 허용",
|
|
16
|
+
"Please enter a valid username": "유효한 사용자 이름을 입력하세요.",
|
|
17
|
+
"Please enter a valid email": "유효한 이메일을 입력하세요.",
|
|
18
|
+
"Please enter your username or email": "사용자 이름 또는 이메일을 입력하세요.",
|
|
19
|
+
"SMS": "SMS",
|
|
20
|
+
"Username/Email": "사용자 이름/이메일",
|
|
21
|
+
"Auth UID": "인증 UID",
|
|
22
|
+
"The authentication allows users to sign in via username or email.": "이 인증 방식을 사용하면 사용자가 사용자 이름 또는 이메일로 로그인할 수 있습니다.",
|
|
23
|
+
"No authentication methods available.": "사용 가능한 인증 방법이 없습니다.",
|
|
24
|
+
"The password is inconsistent, please re-enter": "비밀번호가 일치하지 않습니다. 다시 입력하세요.",
|
|
25
|
+
"Sign-in": "로그인"
|
|
26
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"cron","description":"Cron jobs for your node","version":"2.4.4","author":"Nick Campbell <nicholas.j.campbell@gmail.com> (https://github.com/ncb000gt)","bugs":{"url":"https://github.com/kelektiv/node-cron/issues"},"repository":{"type":"git","url":"https://github.com/kelektiv/node-cron.git"},"main":"lib/cron","scripts":{"lint":"eslint {lib,tests}/*.js","test":"jest --coverage","test:watch":"jest --watch --coverage","test:types":"tsd","prepare":"husky install","release":"semantic-release"},"types":"types/index.d.ts","dependencies":{"@types/luxon":"~3.3.0","luxon":"~3.3.0"},"devDependencies":{"@commitlint/cli":"~17.6.6","@insurgentlab/commitlint-config":"^18.1.0","@insurgentlab/conventional-changelog-preset":"~6.0.3","@semantic-release/changelog":"~6.0.x","@semantic-release/commit-analyzer":"~9.0.x","@semantic-release/git":"~10.0.x","@semantic-release/github":"~8.1.x","@semantic-release/npm":"~10.0.x","@semantic-release/release-notes-generator":"~11.0.x","chai":"~4.2.x","eslint":"~8.36.x","eslint-config-prettier":"^8.7.x","eslint-config-standard":"~17.0.x","eslint-plugin-import":"~2.27.x","eslint-plugin-jest":"~27.2.x","eslint-plugin-n":"~15.6.x","eslint-plugin-prettier":"~4.2.x","eslint-plugin-promise":"~6.1.x","husky":"^8.0.3","jest":"~29.5.x","prettier":"~2.8.x","semantic-release":"~21.0.x","sinon":"^15.0.x","tsd":"^0.28.1"},"keywords":["cron","node cron","node-cron","schedule","scheduler","cronjob","cron job"],"license":"MIT","contributors":["Brandon der Blätter <https://interlucid.com/contact/> (https://github.com/intcreator)","Romain Beauxis <toots@rastageeks.org> (https://github.com/toots)","James Padolsey <> (https://github.com/jamespadolsey)","Finn Herpich <fh@three-heads.de> (https://github.com/ErrorProne)","Clifton Cunningham <clifton.cunningham@gmail.com> (https://github.com/cliftonc)","Eric Abouaf <eric.abouaf@gmail.com> (https://github.com/neyric)","humanchimp <morphcham@gmail.com> (https://github.com/humanchimp)","Craig Condon <craig@spiceapps.com> (https://github.com/spiceapps)","Dan Bear <daniel@hulu.com> (https://github.com/danhbear)","Vadim Baryshev <vadimbaryshev@gmail.com> (https://github.com/baryshev)","Leandro Ferrari <lfthomaz@gmail.com> (https://github.com/lfthomaz)","Gregg Zigler <greggzigler@gmail.com> (https://github.com/greggzigler)","Jordan Abderrachid <jabderrachid@gmail.com> (https://github.com/jordanabderrachid)","Masakazu Matsushita <matsukaz@gmail.com> (matsukaz)","Christopher Lunt <me@kirisu.co.uk> (https://github.com/kirisu)"],"jest":{"collectCoverage":true,"collectCoverageFrom":["lib/*.js"],"coverageThreshold":{"global":{"statements":80,"branches":80,"functions":70,"lines":80}}},"files":["lib","types","CHANGELOG.md","LICENSE","README.md"],"_lastModified":"2024-
|
|
1
|
+
{"name":"cron","description":"Cron jobs for your node","version":"2.4.4","author":"Nick Campbell <nicholas.j.campbell@gmail.com> (https://github.com/ncb000gt)","bugs":{"url":"https://github.com/kelektiv/node-cron/issues"},"repository":{"type":"git","url":"https://github.com/kelektiv/node-cron.git"},"main":"lib/cron","scripts":{"lint":"eslint {lib,tests}/*.js","test":"jest --coverage","test:watch":"jest --watch --coverage","test:types":"tsd","prepare":"husky install","release":"semantic-release"},"types":"types/index.d.ts","dependencies":{"@types/luxon":"~3.3.0","luxon":"~3.3.0"},"devDependencies":{"@commitlint/cli":"~17.6.6","@insurgentlab/commitlint-config":"^18.1.0","@insurgentlab/conventional-changelog-preset":"~6.0.3","@semantic-release/changelog":"~6.0.x","@semantic-release/commit-analyzer":"~9.0.x","@semantic-release/git":"~10.0.x","@semantic-release/github":"~8.1.x","@semantic-release/npm":"~10.0.x","@semantic-release/release-notes-generator":"~11.0.x","chai":"~4.2.x","eslint":"~8.36.x","eslint-config-prettier":"^8.7.x","eslint-config-standard":"~17.0.x","eslint-plugin-import":"~2.27.x","eslint-plugin-jest":"~27.2.x","eslint-plugin-n":"~15.6.x","eslint-plugin-prettier":"~4.2.x","eslint-plugin-promise":"~6.1.x","husky":"^8.0.3","jest":"~29.5.x","prettier":"~2.8.x","semantic-release":"~21.0.x","sinon":"^15.0.x","tsd":"^0.28.1"},"keywords":["cron","node cron","node-cron","schedule","scheduler","cronjob","cron job"],"license":"MIT","contributors":["Brandon der Blätter <https://interlucid.com/contact/> (https://github.com/intcreator)","Romain Beauxis <toots@rastageeks.org> (https://github.com/toots)","James Padolsey <> (https://github.com/jamespadolsey)","Finn Herpich <fh@three-heads.de> (https://github.com/ErrorProne)","Clifton Cunningham <clifton.cunningham@gmail.com> (https://github.com/cliftonc)","Eric Abouaf <eric.abouaf@gmail.com> (https://github.com/neyric)","humanchimp <morphcham@gmail.com> (https://github.com/humanchimp)","Craig Condon <craig@spiceapps.com> (https://github.com/spiceapps)","Dan Bear <daniel@hulu.com> (https://github.com/danhbear)","Vadim Baryshev <vadimbaryshev@gmail.com> (https://github.com/baryshev)","Leandro Ferrari <lfthomaz@gmail.com> (https://github.com/lfthomaz)","Gregg Zigler <greggzigler@gmail.com> (https://github.com/greggzigler)","Jordan Abderrachid <jabderrachid@gmail.com> (https://github.com/jordanabderrachid)","Masakazu Matsushita <matsukaz@gmail.com> (matsukaz)","Christopher Lunt <me@kirisu.co.uk> (https://github.com/kirisu)"],"jest":{"collectCoverage":true,"collectCoverageFrom":["lib/*.js"],"coverageThreshold":{"global":{"statements":80,"branches":80,"functions":70,"lines":80}}},"files":["lib","types","CHANGELOG.md","LICENSE","README.md"],"_lastModified":"2024-03-13T14:25:47.405Z"}
|
|
@@ -20,12 +20,14 @@ __export(authenticators_exports, {
|
|
|
20
20
|
default: () => authenticators_default
|
|
21
21
|
});
|
|
22
22
|
module.exports = __toCommonJS(authenticators_exports);
|
|
23
|
-
var
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
var import_database = require("@nocobase/database");
|
|
24
|
+
var authenticators_default = (0, import_database.defineCollection)({
|
|
25
|
+
dumpRules: {
|
|
26
|
+
group: "third-party"
|
|
27
|
+
},
|
|
28
|
+
shared: true,
|
|
26
29
|
name: "authenticators",
|
|
27
30
|
sortable: true,
|
|
28
|
-
title: '{{t("Authenticators")}}',
|
|
29
31
|
model: "AuthModel",
|
|
30
32
|
createdBy: true,
|
|
31
33
|
updatedBy: true,
|
|
@@ -112,4 +114,4 @@ var authenticators_default = {
|
|
|
112
114
|
through: "usersAuthenticators"
|
|
113
115
|
}
|
|
114
116
|
]
|
|
115
|
-
};
|
|
117
|
+
});
|
|
@@ -20,9 +20,12 @@ __export(token_blacklist_exports, {
|
|
|
20
20
|
default: () => token_blacklist_default
|
|
21
21
|
});
|
|
22
22
|
module.exports = __toCommonJS(token_blacklist_exports);
|
|
23
|
-
var
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
var import_database = require("@nocobase/database");
|
|
24
|
+
var token_blacklist_default = (0, import_database.defineCollection)({
|
|
25
|
+
dumpRules: {
|
|
26
|
+
group: "log"
|
|
27
|
+
},
|
|
28
|
+
shared: true,
|
|
26
29
|
name: "tokenBlacklist",
|
|
27
30
|
model: "TokenBlacklistModel",
|
|
28
31
|
fields: [
|
|
@@ -36,4 +39,4 @@ var token_blacklist_default = {
|
|
|
36
39
|
name: "expiration"
|
|
37
40
|
}
|
|
38
41
|
]
|
|
39
|
-
};
|
|
42
|
+
});
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { CollectionOptions } from '@nocobase/database';
|
|
2
1
|
/**
|
|
3
2
|
* Collection for user information of extended authentication methods,
|
|
4
3
|
* such as saml, oicd, oauth, sms, etc.
|
|
5
4
|
*/
|
|
6
|
-
declare const _default: CollectionOptions;
|
|
5
|
+
declare const _default: import("@nocobase/database").CollectionOptions;
|
|
7
6
|
export default _default;
|
|
@@ -20,17 +20,13 @@ __export(users_authenticators_exports, {
|
|
|
20
20
|
default: () => users_authenticators_default
|
|
21
21
|
});
|
|
22
22
|
module.exports = __toCommonJS(users_authenticators_exports);
|
|
23
|
-
var
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* When dump this collection, the users collection is required to be dumped.
|
|
29
|
-
*/
|
|
30
|
-
with: "users"
|
|
23
|
+
var import_database = require("@nocobase/database");
|
|
24
|
+
var users_authenticators_default = (0, import_database.defineCollection)({
|
|
25
|
+
dumpRules: {
|
|
26
|
+
group: "user"
|
|
31
27
|
},
|
|
28
|
+
shared: true,
|
|
32
29
|
name: "usersAuthenticators",
|
|
33
|
-
title: '{{t("Users Authenticators")}}',
|
|
34
30
|
model: "UserAuthModel",
|
|
35
31
|
createdBy: true,
|
|
36
32
|
updatedBy: true,
|
|
@@ -86,4 +82,4 @@ var users_authenticators_default = {
|
|
|
86
82
|
defaultValue: {}
|
|
87
83
|
}
|
|
88
84
|
]
|
|
89
|
-
};
|
|
85
|
+
});
|
package/dist/server/index.d.ts
CHANGED
package/dist/server/index.js
CHANGED
|
@@ -28,12 +28,15 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
28
28
|
var server_exports = {};
|
|
29
29
|
__export(server_exports, {
|
|
30
30
|
AuthModel: () => import_authenticator.AuthModel,
|
|
31
|
+
BasicAuth: () => import_basic_auth.BasicAuth,
|
|
31
32
|
default: () => import_plugin.default
|
|
32
33
|
});
|
|
33
34
|
module.exports = __toCommonJS(server_exports);
|
|
34
|
-
var
|
|
35
|
+
var import_basic_auth = require("./basic-auth");
|
|
35
36
|
var import_authenticator = require("./model/authenticator");
|
|
37
|
+
var import_plugin = __toESM(require("./plugin"));
|
|
36
38
|
// Annotate the CommonJS export names for ESM import in node:
|
|
37
39
|
0 && (module.exports = {
|
|
38
|
-
AuthModel
|
|
40
|
+
AuthModel,
|
|
41
|
+
BasicAuth
|
|
39
42
|
});
|
|
@@ -23,25 +23,8 @@ module.exports = __toCommonJS(basic_authenticator_exports);
|
|
|
23
23
|
var import_server = require("@nocobase/server");
|
|
24
24
|
var import_preset = require("../../preset");
|
|
25
25
|
class AddBasicAuthMigration extends import_server.Migration {
|
|
26
|
+
appVersion = "<0.14.0-alpha.1";
|
|
26
27
|
async up() {
|
|
27
|
-
await this.db.getCollection("authenticators").sync({
|
|
28
|
-
force: false,
|
|
29
|
-
alter: {
|
|
30
|
-
drop: false
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
await this.db.getCollection("tokenBlacklist").sync({
|
|
34
|
-
force: false,
|
|
35
|
-
alter: {
|
|
36
|
-
drop: false
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
await this.db.getCollection("usersAuthenticators").sync({
|
|
40
|
-
force: false,
|
|
41
|
-
alter: {
|
|
42
|
-
drop: false
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
28
|
const repo = this.context.db.getRepository("authenticators");
|
|
46
29
|
const existed = await repo.count();
|
|
47
30
|
if (existed) {
|
|
@@ -23,6 +23,7 @@ module.exports = __toCommonJS(update_basic_exports);
|
|
|
23
23
|
var import_server = require("@nocobase/server");
|
|
24
24
|
var import_preset = require("../../preset");
|
|
25
25
|
class UpdateBasicAuthMigration extends import_server.Migration {
|
|
26
|
+
appVersion = "<0.14.0-alpha.1";
|
|
26
27
|
async up() {
|
|
27
28
|
const SystemSetting = this.context.db.getRepository("systemSettings");
|
|
28
29
|
const setting = await SystemSetting.findOne();
|
|
@@ -23,6 +23,7 @@ module.exports = __toCommonJS(fix_allow_signup_exports);
|
|
|
23
23
|
var import_server = require("@nocobase/server");
|
|
24
24
|
var import_preset = require("../../preset");
|
|
25
25
|
class FixAllowSignUpMigration extends import_server.Migration {
|
|
26
|
+
appVersion = "<0.18.0-alpha.1";
|
|
26
27
|
async up() {
|
|
27
28
|
var _a;
|
|
28
29
|
const repo = this.context.db.getRepository("authenticators");
|
package/dist/server/plugin.js
CHANGED
|
@@ -51,9 +51,7 @@ class AuthPlugin extends import_server.Plugin {
|
|
|
51
51
|
this.app.db.registerModels({ AuthModel: import_authenticator.AuthModel });
|
|
52
52
|
}
|
|
53
53
|
async load() {
|
|
54
|
-
await this.
|
|
55
|
-
directory: (0, import_path.resolve)(__dirname, "collections")
|
|
56
|
-
});
|
|
54
|
+
await this.importCollections((0, import_path.resolve)(__dirname, "collections"));
|
|
57
55
|
this.db.addMigrations({
|
|
58
56
|
namespace: "auth",
|
|
59
57
|
directory: (0, import_path.resolve)(__dirname, "migrations"),
|
package/package.json
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/plugin-auth",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.0-alpha.10",
|
|
4
4
|
"main": "./dist/server/index.js",
|
|
5
|
+
"homepage": "https://docs.nocobase.com/plugins/auth",
|
|
6
|
+
"homepage.zh-CN": "https://docs-cn.nocobase.com/plugins/auth",
|
|
5
7
|
"devDependencies": {
|
|
6
8
|
"@ant-design/icons": "5.x",
|
|
7
9
|
"@formily/react": "2.x",
|
|
@@ -22,7 +24,10 @@
|
|
|
22
24
|
},
|
|
23
25
|
"displayName": "Authentication",
|
|
24
26
|
"displayName.zh-CN": "用户认证",
|
|
25
|
-
"description": "Basic authentication and authenticator management",
|
|
26
|
-
"description.zh-CN": "
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"description": "Basic authentication and authenticator management.",
|
|
28
|
+
"description.zh-CN": "提供基础认证功能和扩展认证器管理功能。",
|
|
29
|
+
"gitHead": "d09d81eba67339da36bcec27939a85b35d180770",
|
|
30
|
+
"keywords": [
|
|
31
|
+
"Authentication"
|
|
32
|
+
]
|
|
28
33
|
}
|