@nocobase/auth 0.12.0-alpha.5 → 0.13.0-alpha.1

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.
@@ -14,6 +14,7 @@ type AuthManagerOptions = {
14
14
  };
15
15
  type AuthConfig = {
16
16
  auth: AuthExtend<Auth>;
17
+ title?: string;
17
18
  };
18
19
  export declare class AuthManager {
19
20
  protected options: AuthManagerOptions;
@@ -32,7 +33,10 @@ export declare class AuthManager {
32
33
  * @param {AuthConfig} authConfig - Configurations of the kind of authenticator.
33
34
  */
34
35
  registerTypes(authType: string, authConfig: AuthConfig): void;
35
- listTypes(): string[];
36
+ listTypes(): {
37
+ name: string;
38
+ title: string;
39
+ }[];
36
40
  getAuthConfig(authType: string): AuthConfig;
37
41
  /**
38
42
  * get
@@ -42,7 +42,10 @@ class AuthManager {
42
42
  this.authTypes.register(authType, authConfig);
43
43
  }
44
44
  listTypes() {
45
- return Array.from(this.authTypes.getKeys());
45
+ return Array.from(this.authTypes.getEntities()).map(([authType, authConfig]) => ({
46
+ name: authType,
47
+ title: authConfig.title
48
+ }));
46
49
  }
47
50
  getAuthConfig(authType) {
48
51
  return this.authTypes.get(authType);
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@nocobase/auth",
3
- "version": "0.12.0-alpha.5",
3
+ "version": "0.13.0-alpha.1",
4
4
  "description": "",
5
5
  "license": "Apache-2.0",
6
6
  "main": "./lib/index.js",
7
7
  "types": "./lib/index.d.ts",
8
8
  "dependencies": {
9
- "@nocobase/actions": "0.12.0-alpha.5",
10
- "@nocobase/database": "0.12.0-alpha.5",
11
- "@nocobase/resourcer": "0.12.0-alpha.5",
12
- "@nocobase/utils": "0.12.0-alpha.5",
9
+ "@nocobase/actions": "0.13.0-alpha.1",
10
+ "@nocobase/database": "0.13.0-alpha.1",
11
+ "@nocobase/resourcer": "0.13.0-alpha.1",
12
+ "@nocobase/utils": "0.13.0-alpha.1",
13
13
  "@types/jsonwebtoken": "^8.5.8",
14
14
  "jsonwebtoken": "^8.5.1"
15
15
  },
@@ -18,5 +18,5 @@
18
18
  "url": "git+https://github.com/nocobase/nocobase.git",
19
19
  "directory": "packages/auth"
20
20
  },
21
- "gitHead": "689cc16e83361c4d0b91907e0deac30bdb907692"
21
+ "gitHead": "0ebd4e85a1b0b0d0943768ab6cb5c3d824562239"
22
22
  }