@koishi-ce/plugin-auth 1.0.2 → 1.1.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.
package/lib/index.d.ts CHANGED
@@ -34,7 +34,7 @@ declare module "@koishi-ce/console" {
34
34
  }
35
35
  }
36
36
  /** token 表记录:一次登录会话的令牌及其来源信息。 */
37
- interface LoginToken {
37
+ export interface LoginToken {
38
38
  /** 自增主键(删除指定会话用) */
39
39
  inc: number;
40
40
  /** 所属用户 id */
@@ -53,7 +53,7 @@ interface LoginToken {
53
53
  address: string;
54
54
  }
55
55
  /** 下发到客户端的登录态(user 数据服务的单条形态,不含 tokens/bindings 明细)。 */
56
- type Auth = Pick<LoginToken, "token" | "expiredAt"> & Pick<User, "id" | "name" | "authority" | "config">;
56
+ export type Auth = Pick<LoginToken, "token" | "expiredAt"> & Pick<User, "id" | "name" | "authority" | "config">;
57
57
  /** user 数据服务下发给客户端的完整鉴权数据:登录态 + 会话列表 + 绑定列表。 */
58
58
  interface AuthData extends Auth {
59
59
  tokens: Omit<LoginToken, "token" | "id">[];
@@ -66,14 +66,14 @@ type LoginType = "platform" | "password" | "token";
66
66
  * @param length 令牌长度,默认 40
67
67
  * @returns 从字符表随机取字符拼接成的字符串
68
68
  */
69
- declare function randomId(length?: number): string;
69
+ export declare function randomId(length?: number): string;
70
70
  /** login/platform 事件的返回值:待登录用户信息 + 一次性验证码及其过期时间。 */
71
- interface UserLogin extends Pick<User, "id" | "name"> {
71
+ export interface UserLogin extends Pick<User, "id" | "name"> {
72
72
  token: string;
73
73
  expiredAt: number;
74
74
  }
75
75
  /** user/update 事件允许修改的用户字段。 */
76
- type UserUpdate = Partial<Pick<User, "name" | "password" | "config">>;
76
+ export type UserUpdate = Partial<Pick<User, "name" | "password" | "config">>;
77
77
  /**
78
78
  * 鉴权服务:维护控制台客户端的登录态。
79
79
  *
@@ -120,4 +120,4 @@ declare namespace AuthService {
120
120
  }
121
121
  }
122
122
  //#endregion
123
- export { Auth, LoginToken, UserLogin, UserUpdate, AuthService as default, randomId };
123
+ export { AuthService as default };
package/locales/de-DE.yml CHANGED
@@ -2,13 +2,11 @@
2
2
  # Copyright (c) 2019-present Shigma and Koishijs contributors.
3
3
  # Copyright (c) 2026-present Koishi-CE contributors.
4
4
 
5
- -
6
- $description: 管理员设置
5
+ - $description: Administrations-Einstellungen
7
6
  admin:
8
- enabled: 启用管理员账号。
9
- username: 管理员用户名。
10
- password: 管理员密码。
11
- -
12
- $description: 高级设置
13
- authTokenExpire: 用户令牌有效期。
14
- loginTokenExpire: 登录令牌有效期。
7
+ enabled: Administrations-Konto aktivieren.
8
+ username: Benutzername des Administrators.
9
+ password: Passwort des Administrators.
10
+ - $description: Erweiterte Einstellungen
11
+ authTokenExpire: Gültigkeitsdauer der Benutzer-Tokens.
12
+ loginTokenExpire: Gültigkeitsdauer der Login-Tokens.
package/locales/en-US.yml CHANGED
@@ -2,13 +2,11 @@
2
2
  # Copyright (c) 2019-present Shigma and Koishijs contributors.
3
3
  # Copyright (c) 2026-present Koishi-CE contributors.
4
4
 
5
- -
6
- $description: 管理员设置
5
+ - $description: Admin Settings
7
6
  admin:
8
- enabled: 启用管理员账号。
9
- username: 管理员用户名。
10
- password: 管理员密码。
11
- -
12
- $description: 高级设置
13
- authTokenExpire: 用户令牌有效期。
14
- loginTokenExpire: 登录令牌有效期。
7
+ enabled: Enable the admin account.
8
+ username: Admin username.
9
+ password: Admin password.
10
+ - $description: Advanced Settings
11
+ authTokenExpire: Lifetime of user tokens.
12
+ loginTokenExpire: Lifetime of login tokens.
package/locales/fr-FR.yml CHANGED
@@ -2,13 +2,11 @@
2
2
  # Copyright (c) 2019-present Shigma and Koishijs contributors.
3
3
  # Copyright (c) 2026-present Koishi-CE contributors.
4
4
 
5
- -
6
- $description: 管理员设置
5
+ - $description: Paramètres administrateur
7
6
  admin:
8
- enabled: 启用管理员账号。
9
- username: 管理员用户名。
10
- password: 管理员密码。
11
- -
12
- $description: 高级设置
13
- authTokenExpire: 用户令牌有效期。
14
- loginTokenExpire: 登录令牌有效期。
7
+ enabled: Activer le compte administrateur.
8
+ username: Nom d'utilisateur administrateur.
9
+ password: Mot de passe administrateur.
10
+ - $description: Paramètres avancés
11
+ authTokenExpire: Durée de validité des jetons utilisateur.
12
+ loginTokenExpire: Durée de validité des jetons de connexion.
package/locales/ja-JP.yml CHANGED
@@ -2,13 +2,11 @@
2
2
  # Copyright (c) 2019-present Shigma and Koishijs contributors.
3
3
  # Copyright (c) 2026-present Koishi-CE contributors.
4
4
 
5
- -
6
- $description: 管理员设置
5
+ - $description: 管理者設定
7
6
  admin:
8
- enabled: 启用管理员账号。
9
- username: 管理员用户名。
10
- password: 管理员密码。
11
- -
12
- $description: 高级设置
13
- authTokenExpire: 用户令牌有效期。
14
- loginTokenExpire: 登录令牌有效期。
7
+ enabled: 管理者アカウントを有効にします。
8
+ username: 管理者のユーザー名。
9
+ password: 管理者のパスワード。
10
+ - $description: 詳細設定
11
+ authTokenExpire: ユーザートークンの有効期間。
12
+ loginTokenExpire: ログイントークンの有効期間。
package/locales/ru-RU.yml CHANGED
@@ -2,13 +2,11 @@
2
2
  # Copyright (c) 2019-present Shigma and Koishijs contributors.
3
3
  # Copyright (c) 2026-present Koishi-CE contributors.
4
4
 
5
- -
6
- $description: 管理员设置
5
+ - $description: Настройки администратора
7
6
  admin:
8
- enabled: 启用管理员账号。
9
- username: 管理员用户名。
10
- password: 管理员密码。
11
- -
12
- $description: 高级设置
13
- authTokenExpire: 用户令牌有效期。
14
- loginTokenExpire: 登录令牌有效期。
7
+ enabled: Включить учётную запись администратора.
8
+ username: Имя пользователя администратора.
9
+ password: Пароль администратора.
10
+ - $description: Расширенные настройки
11
+ authTokenExpire: Срок действия токенов пользователя.
12
+ loginTokenExpire: Срок действия токенов входа.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@koishi-ce/plugin-auth",
3
3
  "description": "Console User Authentication",
4
- "version": "1.0.2",
4
+ "version": "1.1.0",
5
5
  "type": "module",
6
6
  "main": "lib/index.mjs",
7
7
  "typings": "lib/index.d.ts",
@@ -54,7 +54,7 @@
54
54
  "@koishi-ce/koishi": "^1.0.0"
55
55
  },
56
56
  "devDependencies": {
57
- "@koishi-ce/client": "^1.0.4",
57
+ "@koishi-ce/client": "^1.1.0",
58
58
  "vue": "^3.5.12",
59
59
  "vue-router": "^5.2.0"
60
60
  },