@typekcz-nocobase-plugins/plugin-oidc-plus 1.0.0-1 → 1.0.0-2

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.
Files changed (82) hide show
  1. package/dist/client/OIDCButton.d.ts +9 -0
  2. package/dist/client/Options.d.ts +2 -0
  3. package/dist/client/index.d.ts +5 -0
  4. package/dist/client/index.js +18 -0
  5. package/dist/client/locale/index.d.ts +3 -0
  6. package/dist/constants.d.ts +4 -0
  7. package/dist/constants.js +46 -0
  8. package/dist/externalVersion.js +23 -0
  9. package/dist/index.d.ts +2 -0
  10. package/dist/index.js +48 -0
  11. package/dist/locale/en-US.json +40 -0
  12. package/dist/locale/es-ES.json +25 -0
  13. package/dist/locale/fr-FR.json +21 -0
  14. package/dist/locale/ko_KR.json +28 -0
  15. package/dist/locale/pt-BR.json +21 -0
  16. package/dist/locale/zh-CN.json +28 -0
  17. package/dist/node_modules/nanoid/LICENSE +20 -0
  18. package/dist/node_modules/nanoid/async/index.browser.cjs +34 -0
  19. package/dist/node_modules/nanoid/async/index.browser.js +34 -0
  20. package/dist/node_modules/nanoid/async/index.cjs +35 -0
  21. package/dist/node_modules/nanoid/async/index.d.ts +56 -0
  22. package/dist/node_modules/nanoid/async/index.js +35 -0
  23. package/dist/node_modules/nanoid/async/index.native.js +26 -0
  24. package/dist/node_modules/nanoid/async/package.json +12 -0
  25. package/dist/node_modules/nanoid/bin/nanoid.cjs +55 -0
  26. package/dist/node_modules/nanoid/index.browser.cjs +34 -0
  27. package/dist/node_modules/nanoid/index.browser.js +34 -0
  28. package/dist/node_modules/nanoid/index.cjs +1 -0
  29. package/dist/node_modules/nanoid/index.d.ts +91 -0
  30. package/dist/node_modules/nanoid/index.js +45 -0
  31. package/dist/node_modules/nanoid/nanoid.js +1 -0
  32. package/dist/node_modules/nanoid/non-secure/index.cjs +21 -0
  33. package/dist/node_modules/nanoid/non-secure/index.d.ts +33 -0
  34. package/dist/node_modules/nanoid/non-secure/index.js +21 -0
  35. package/dist/node_modules/nanoid/non-secure/package.json +6 -0
  36. package/dist/node_modules/nanoid/package.json +1 -0
  37. package/dist/node_modules/nanoid/url-alphabet/index.cjs +3 -0
  38. package/dist/node_modules/nanoid/url-alphabet/index.js +3 -0
  39. package/dist/node_modules/nanoid/url-alphabet/package.json +6 -0
  40. package/dist/node_modules/openid-client/lib/client.js +1849 -0
  41. package/dist/node_modules/openid-client/lib/device_flow_handle.js +125 -0
  42. package/dist/node_modules/openid-client/lib/errors.js +55 -0
  43. package/dist/node_modules/openid-client/lib/helpers/assert.js +24 -0
  44. package/dist/node_modules/openid-client/lib/helpers/base64url.js +13 -0
  45. package/dist/node_modules/openid-client/lib/helpers/client.js +211 -0
  46. package/dist/node_modules/openid-client/lib/helpers/consts.js +7 -0
  47. package/dist/node_modules/openid-client/lib/helpers/decode_jwt.js +27 -0
  48. package/dist/node_modules/openid-client/lib/helpers/deep_clone.js +1 -0
  49. package/dist/node_modules/openid-client/lib/helpers/defaults.js +27 -0
  50. package/dist/node_modules/openid-client/lib/helpers/generators.js +14 -0
  51. package/dist/node_modules/openid-client/lib/helpers/is_key_object.js +4 -0
  52. package/dist/node_modules/openid-client/lib/helpers/is_plain_object.js +1 -0
  53. package/dist/node_modules/openid-client/lib/helpers/issuer.js +111 -0
  54. package/dist/node_modules/openid-client/lib/helpers/keystore.js +298 -0
  55. package/dist/node_modules/openid-client/lib/helpers/merge.js +24 -0
  56. package/dist/node_modules/openid-client/lib/helpers/pick.js +9 -0
  57. package/dist/node_modules/openid-client/lib/helpers/process_response.js +71 -0
  58. package/dist/node_modules/openid-client/lib/helpers/request.js +200 -0
  59. package/dist/node_modules/openid-client/lib/helpers/unix_timestamp.js +1 -0
  60. package/dist/node_modules/openid-client/lib/helpers/weak_cache.js +1 -0
  61. package/dist/node_modules/openid-client/lib/helpers/webfinger_normalize.js +71 -0
  62. package/dist/node_modules/openid-client/lib/helpers/www_authenticate_parser.js +14 -0
  63. package/dist/node_modules/openid-client/lib/index.js +1 -0
  64. package/dist/node_modules/openid-client/lib/issuer.js +191 -0
  65. package/dist/node_modules/openid-client/lib/issuer_registry.js +3 -0
  66. package/dist/node_modules/openid-client/lib/passport_strategy.js +205 -0
  67. package/dist/node_modules/openid-client/lib/token_set.js +35 -0
  68. package/dist/node_modules/openid-client/package.json +1 -0
  69. package/dist/node_modules/openid-client/types/index.d.ts +622 -0
  70. package/dist/server/actions/getAuthUrl.d.ts +2 -0
  71. package/dist/server/actions/getAuthUrl.js +56 -0
  72. package/dist/server/actions/redirect.d.ts +2 -0
  73. package/dist/server/actions/redirect.js +64 -0
  74. package/dist/server/index.d.ts +1 -0
  75. package/dist/server/index.js +42 -0
  76. package/dist/server/oidc-auth.d.ts +15 -0
  77. package/dist/server/oidc-auth.js +187 -0
  78. package/dist/server/plugin.d.ts +11 -0
  79. package/dist/server/plugin.js +93 -0
  80. package/dist/swagger/index.d.ts +143 -0
  81. package/dist/swagger/index.js +187 -0
  82. package/package.json +2 -2
@@ -0,0 +1,64 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ var __defProp = Object.defineProperty;
11
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
12
+ var __getOwnPropNames = Object.getOwnPropertyNames;
13
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
14
+ var __export = (target, all) => {
15
+ for (var name in all)
16
+ __defProp(target, name, { get: all[name], enumerable: true });
17
+ };
18
+ var __copyProps = (to, from, except, desc) => {
19
+ if (from && typeof from === "object" || typeof from === "function") {
20
+ for (let key of __getOwnPropNames(from))
21
+ if (!__hasOwnProp.call(to, key) && key !== except)
22
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
23
+ }
24
+ return to;
25
+ };
26
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
27
+ var redirect_exports = {};
28
+ __export(redirect_exports, {
29
+ redirect: () => redirect
30
+ });
31
+ module.exports = __toCommonJS(redirect_exports);
32
+ var import_server = require("@nocobase/server");
33
+ const redirect = async (ctx, next) => {
34
+ const {
35
+ params: { state }
36
+ } = ctx.action;
37
+ const search = new URLSearchParams(decodeURIComponent(state));
38
+ const authenticator = search.get("name");
39
+ const appName = search.get("app");
40
+ const redirect2 = search.get("redirect") || "/admin";
41
+ let prefix = process.env.APP_PUBLIC_PATH || "";
42
+ if (appName && appName !== "main") {
43
+ const appSupervisor = import_server.AppSupervisor.getInstance();
44
+ if ((appSupervisor == null ? void 0 : appSupervisor.runningMode) !== "single") {
45
+ prefix += `apps/${appName}`;
46
+ }
47
+ }
48
+ const auth = await ctx.app.authManager.get(authenticator, ctx);
49
+ if (prefix.endsWith("/")) {
50
+ prefix = prefix.slice(0, -1);
51
+ }
52
+ try {
53
+ const { token } = await auth.signIn();
54
+ ctx.redirect(`${prefix}${redirect2}?authenticator=${authenticator}&token=${token}`);
55
+ } catch (error) {
56
+ ctx.logger.error("OIDC auth error", { error });
57
+ ctx.redirect(`${prefix}/signin?redirect=${redirect2}&authenticator=${authenticator}&error=${error.message}`);
58
+ }
59
+ await next();
60
+ };
61
+ // Annotate the CommonJS export names for ESM import in node:
62
+ 0 && (module.exports = {
63
+ redirect
64
+ });
@@ -0,0 +1 @@
1
+ export { default } from './plugin';
@@ -0,0 +1,42 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ var __create = Object.create;
11
+ var __defProp = Object.defineProperty;
12
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
13
+ var __getOwnPropNames = Object.getOwnPropertyNames;
14
+ var __getProtoOf = Object.getPrototypeOf;
15
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
16
+ var __export = (target, all) => {
17
+ for (var name in all)
18
+ __defProp(target, name, { get: all[name], enumerable: true });
19
+ };
20
+ var __copyProps = (to, from, except, desc) => {
21
+ if (from && typeof from === "object" || typeof from === "function") {
22
+ for (let key of __getOwnPropNames(from))
23
+ if (!__hasOwnProp.call(to, key) && key !== except)
24
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
25
+ }
26
+ return to;
27
+ };
28
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
29
+ // If the importer is in node compatibility mode or this is not an ESM
30
+ // file that has been converted to a CommonJS file using a Babel-
31
+ // compatible transform (i.e. "__esModule" has not been set), then set
32
+ // "default" to the CommonJS "module.exports" for node compatibility.
33
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
34
+ mod
35
+ ));
36
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
37
+ var server_exports = {};
38
+ __export(server_exports, {
39
+ default: () => import_plugin.default
40
+ });
41
+ module.exports = __toCommonJS(server_exports);
42
+ var import_plugin = __toESM(require("./plugin"));
@@ -0,0 +1,15 @@
1
+ import { AuthConfig, BaseAuth } from '@nocobase/auth';
2
+ export declare class OIDCAuth extends BaseAuth {
3
+ constructor(config: AuthConfig);
4
+ getRedirectUri(): string;
5
+ getOptions(): any;
6
+ getExchangeBody(): {};
7
+ mapField(userInfo: {
8
+ [source: string]: any;
9
+ }): {
10
+ [source: string]: any;
11
+ };
12
+ createOIDCClient(): Promise<import("openid-client").BaseClient>;
13
+ validate(): Promise<import("@nocobase/database").Model<any, any>>;
14
+ signOut(): Promise<any>;
15
+ }
@@ -0,0 +1,187 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ var __defProp = Object.defineProperty;
11
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
12
+ var __getOwnPropNames = Object.getOwnPropertyNames;
13
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
14
+ var __export = (target, all) => {
15
+ for (var name in all)
16
+ __defProp(target, name, { get: all[name], enumerable: true });
17
+ };
18
+ var __copyProps = (to, from, except, desc) => {
19
+ if (from && typeof from === "object" || typeof from === "function") {
20
+ for (let key of __getOwnPropNames(from))
21
+ if (!__hasOwnProp.call(to, key) && key !== except)
22
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
23
+ }
24
+ return to;
25
+ };
26
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
27
+ var oidc_auth_exports = {};
28
+ __export(oidc_auth_exports, {
29
+ OIDCAuth: () => OIDCAuth
30
+ });
31
+ module.exports = __toCommonJS(oidc_auth_exports);
32
+ var import_auth = require("@nocobase/auth");
33
+ var import_openid_client = require("openid-client");
34
+ var import_constants = require("../constants");
35
+ class OIDCAuth extends import_auth.BaseAuth {
36
+ constructor(config) {
37
+ const { ctx } = config;
38
+ super({
39
+ ...config,
40
+ userCollection: ctx.db.getCollection("users")
41
+ });
42
+ }
43
+ getRedirectUri() {
44
+ const ctx = this.ctx;
45
+ const { http, port } = this.getOptions();
46
+ const protocol = http ? "http" : "https";
47
+ const host = port ? `${ctx.hostname}${port ? `:${port}` : ""}` : ctx.host;
48
+ return `${protocol}://${host}${process.env.API_BASE_PATH}oidc:redirect`;
49
+ }
50
+ getOptions() {
51
+ var _a;
52
+ return ((_a = this.options) == null ? void 0 : _a.oidc) || {};
53
+ }
54
+ getExchangeBody() {
55
+ const options = this.getOptions();
56
+ const { exchangeBodyKeys } = options;
57
+ if (!exchangeBodyKeys) {
58
+ return {};
59
+ }
60
+ const body = {};
61
+ exchangeBodyKeys.filter((item) => item.enabled).forEach((item) => {
62
+ const name = item.paramName || item.optionsKey;
63
+ body[name] = options[item.optionsKey];
64
+ });
65
+ return body;
66
+ }
67
+ mapField(userInfo) {
68
+ const { fieldMap } = this.getOptions();
69
+ if (!fieldMap) {
70
+ return userInfo;
71
+ }
72
+ fieldMap.forEach((item) => {
73
+ const { source, target } = item;
74
+ if (userInfo[source]) {
75
+ userInfo[target] = userInfo[source];
76
+ }
77
+ });
78
+ return userInfo;
79
+ }
80
+ async createOIDCClient() {
81
+ const { issuer, clientId, clientSecret, idTokenSignedResponseAlg } = this.getOptions();
82
+ const oidc = await import_openid_client.Issuer.discover(issuer);
83
+ return new oidc.Client({
84
+ client_id: clientId,
85
+ client_secret: clientSecret,
86
+ id_token_signed_response_alg: idTokenSignedResponseAlg || "RS256"
87
+ });
88
+ }
89
+ async validate() {
90
+ var _a;
91
+ const ctx = this.ctx;
92
+ const { params: values } = ctx.action;
93
+ const { userInfoMethod = "GET", accessTokenVia = "header", stateToken } = this.getOptions();
94
+ const token = stateToken || ctx.cookies.get(import_constants.cookieName);
95
+ const search = new URLSearchParams(decodeURIComponent(values.state));
96
+ if (search.get("token") !== token) {
97
+ ctx.logger.error("nocobase_oidc state mismatch", { method: "validate" });
98
+ return null;
99
+ }
100
+ const client = await this.createOIDCClient();
101
+ const tokens = await client.callback(
102
+ this.getRedirectUri(),
103
+ {
104
+ code: values.code,
105
+ iss: values.iss
106
+ },
107
+ {},
108
+ { exchangeBody: this.getExchangeBody() }
109
+ );
110
+ const userInfo = await client.userinfo(tokens, {
111
+ method: userInfoMethod,
112
+ via: accessTokenVia !== "query" ? accessTokenVia : "header",
113
+ params: accessTokenVia === "query" ? {
114
+ access_token: tokens.access_token
115
+ } : {}
116
+ });
117
+ const mappedUserInfo = this.mapField(userInfo);
118
+ const { nickname, username, name, sub, email, phone, ...rest } = mappedUserInfo;
119
+ const authenticator = this.authenticator;
120
+ const userFields = {
121
+ username: username ?? null,
122
+ nickname: nickname || name || username || sub,
123
+ email: email ?? null,
124
+ phone: phone ?? null,
125
+ ...rest
126
+ };
127
+ let user = await authenticator.findUser(sub);
128
+ if (user) {
129
+ this.userRepository.update({
130
+ filter: {
131
+ id: user.id
132
+ },
133
+ values: userFields
134
+ });
135
+ return user;
136
+ }
137
+ const { userBindField = "email" } = this.getOptions();
138
+ if (userBindField === "email" && email) {
139
+ user = await this.userRepository.findOne({
140
+ filter: { email }
141
+ });
142
+ } else if (userBindField === "username" && username) {
143
+ user = await this.userRepository.findOne({
144
+ filter: { username }
145
+ });
146
+ }
147
+ if (user) {
148
+ this.userRepository.update({
149
+ filter: {
150
+ id: user.id
151
+ },
152
+ values: userFields
153
+ });
154
+ await authenticator.addUser(user.id, {
155
+ through: {
156
+ uuid: sub
157
+ }
158
+ });
159
+ return user;
160
+ }
161
+ const { autoSignup } = ((_a = this.options) == null ? void 0 : _a.public) || {};
162
+ if (!autoSignup) {
163
+ throw new Error("User not found");
164
+ }
165
+ if (username && !this.validateUsername(username)) {
166
+ throw new Error(`Username must be 2-16 characters in length (excluding @.<>"'/)`);
167
+ }
168
+ return await authenticator.newUser(sub, userFields);
169
+ }
170
+ async signOut() {
171
+ const { issuer, clientId, logout } = this.getOptions();
172
+ const oidc = await import_openid_client.Issuer.discover(issuer);
173
+ if (logout && oidc.metadata.end_session_endpoint) {
174
+ const logoutUrl = new URL(oidc.metadata.end_session_endpoint);
175
+ logoutUrl.searchParams.set("client_id", clientId);
176
+ this.ctx.cookies.set(import_constants.logoutCookieName, logoutUrl.toString(), {
177
+ httpOnly: false,
178
+ domain: this.ctx.hostname
179
+ });
180
+ }
181
+ return super.signOut();
182
+ }
183
+ }
184
+ // Annotate the CommonJS export names for ESM import in node:
185
+ 0 && (module.exports = {
186
+ OIDCAuth
187
+ });
@@ -0,0 +1,11 @@
1
+ import { InstallOptions, Plugin } from '@nocobase/server';
2
+ export declare class PluginOIDCServer extends Plugin {
3
+ afterAdd(): void;
4
+ beforeLoad(): void;
5
+ load(): Promise<void>;
6
+ install(options?: InstallOptions): Promise<void>;
7
+ afterEnable(): Promise<void>;
8
+ afterDisable(): Promise<void>;
9
+ remove(): Promise<void>;
10
+ }
11
+ export default PluginOIDCServer;
@@ -0,0 +1,93 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ var __defProp = Object.defineProperty;
11
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
12
+ var __getOwnPropNames = Object.getOwnPropertyNames;
13
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
14
+ var __export = (target, all) => {
15
+ for (var name in all)
16
+ __defProp(target, name, { get: all[name], enumerable: true });
17
+ };
18
+ var __copyProps = (to, from, except, desc) => {
19
+ if (from && typeof from === "object" || typeof from === "function") {
20
+ for (let key of __getOwnPropNames(from))
21
+ if (!__hasOwnProp.call(to, key) && key !== except)
22
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
23
+ }
24
+ return to;
25
+ };
26
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
27
+ var plugin_exports = {};
28
+ __export(plugin_exports, {
29
+ PluginOIDCServer: () => PluginOIDCServer,
30
+ default: () => plugin_default
31
+ });
32
+ module.exports = __toCommonJS(plugin_exports);
33
+ var import_server = require("@nocobase/server");
34
+ var import_getAuthUrl = require("./actions/getAuthUrl");
35
+ var import_redirect = require("./actions/redirect");
36
+ var import_constants = require("../constants");
37
+ var import_oidc_auth = require("./oidc-auth");
38
+ var import_path = require("path");
39
+ class PluginOIDCServer extends import_server.Plugin {
40
+ afterAdd() {
41
+ }
42
+ beforeLoad() {
43
+ }
44
+ async load() {
45
+ this.db.addMigrations({
46
+ namespace: "auth",
47
+ directory: (0, import_path.resolve)(__dirname, "migrations"),
48
+ context: {
49
+ plugin: this
50
+ }
51
+ });
52
+ this.app.authManager.registerTypes(import_constants.authType, {
53
+ auth: import_oidc_auth.OIDCAuth
54
+ });
55
+ this.app.resource({
56
+ name: "oidc",
57
+ actions: {
58
+ getAuthUrl: import_getAuthUrl.getAuthUrl,
59
+ redirect: import_redirect.redirect
60
+ }
61
+ });
62
+ this.app.acl.allow("oidc", "*", "public");
63
+ /* istanbul ignore next -- @preserve */
64
+ import_server.Gateway.getInstance().addAppSelectorMiddleware(async (ctx, next) => {
65
+ const { req } = ctx;
66
+ const url = new URL(req.url, `http://${req.headers.host}`);
67
+ const params = url.searchParams;
68
+ const state = params.get("state");
69
+ if (!state) {
70
+ return next();
71
+ }
72
+ const search = new URLSearchParams(state);
73
+ const appName = search.get("app");
74
+ if (appName) {
75
+ ctx.resolvedAppName = appName;
76
+ }
77
+ await next();
78
+ });
79
+ }
80
+ async install(options) {
81
+ }
82
+ async afterEnable() {
83
+ }
84
+ async afterDisable() {
85
+ }
86
+ async remove() {
87
+ }
88
+ }
89
+ var plugin_default = PluginOIDCServer;
90
+ // Annotate the CommonJS export names for ESM import in node:
91
+ 0 && (module.exports = {
92
+ PluginOIDCServer
93
+ });
@@ -0,0 +1,143 @@
1
+ declare const _default: {
2
+ info: {
3
+ title: string;
4
+ };
5
+ paths: {
6
+ '/oidc:getAuthUrl': {
7
+ security: any[];
8
+ get: {
9
+ description: string;
10
+ tags: string[];
11
+ parameters: {
12
+ name: string;
13
+ description: string;
14
+ in: string;
15
+ schema: {
16
+ type: string;
17
+ };
18
+ required: boolean;
19
+ }[];
20
+ responses: {
21
+ 200: {
22
+ description: string;
23
+ content: {
24
+ 'application/json': {
25
+ schema: {
26
+ type: string;
27
+ };
28
+ };
29
+ };
30
+ };
31
+ };
32
+ };
33
+ };
34
+ '/auth:signIn': {
35
+ security: any[];
36
+ post: {
37
+ description: string;
38
+ tags: string[];
39
+ parameters: {
40
+ name: string;
41
+ description: string;
42
+ in: string;
43
+ schema: {
44
+ type: string;
45
+ };
46
+ required: boolean;
47
+ }[];
48
+ requestBody: {
49
+ content: {
50
+ 'application/json': {
51
+ schema: {
52
+ type: string;
53
+ properties: {
54
+ code: {
55
+ type: string;
56
+ };
57
+ state: {
58
+ type: string;
59
+ };
60
+ iss: {
61
+ type: string;
62
+ };
63
+ };
64
+ };
65
+ };
66
+ };
67
+ };
68
+ responses: {
69
+ 200: {
70
+ description: string;
71
+ content: {
72
+ 'application/json': {
73
+ schema: {
74
+ type: string;
75
+ properties: {
76
+ token: {
77
+ type: string;
78
+ };
79
+ user: {
80
+ type: string;
81
+ description: string;
82
+ properties: {
83
+ id: {
84
+ type: string;
85
+ description: string;
86
+ };
87
+ nickname: {
88
+ type: string;
89
+ description: string;
90
+ };
91
+ email: {
92
+ type: string;
93
+ description: string;
94
+ };
95
+ phone: {
96
+ type: string;
97
+ description: string;
98
+ };
99
+ appLang: {
100
+ type: string;
101
+ description: string;
102
+ };
103
+ systemSettings: {
104
+ type: string;
105
+ description: string;
106
+ properties: {
107
+ theme: {
108
+ type: string;
109
+ description: string;
110
+ };
111
+ };
112
+ };
113
+ createdAt: {
114
+ type: string;
115
+ format: string;
116
+ description: string;
117
+ };
118
+ updatedAt: {
119
+ type: string;
120
+ format: string;
121
+ description: string;
122
+ };
123
+ createdById: {
124
+ type: string;
125
+ description: string;
126
+ };
127
+ updatedById: {
128
+ type: string;
129
+ description: string;
130
+ };
131
+ };
132
+ };
133
+ };
134
+ };
135
+ };
136
+ };
137
+ };
138
+ };
139
+ };
140
+ };
141
+ };
142
+ };
143
+ export default _default;