oak-general-business/lib/oak-app-domain/OauthProviderConfigs/Storage.js

95 lines
2.2 KiB
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.desc = void 0;
const Action_1 = require("./Action");
exports.desc = {
attributes: {
systemId: {
notNull: true,
type: "ref",
ref: "system"
},
name: {
notNull: true,
type: "varchar",
params: {
length: 64
}
},
type: {
notNull: true,
type: "enum",
enumeration: ["oak", "gitea", "github", "google", "facebook", "twitter", "linkedin", "custom", "gitlab", "microsoft", "apple", "tencent", "weixin", "weibo", "dingtalk"]
},
logo: {
type: "varchar",
params: {
length: 256
}
},
// OAuth 端点 (RFC 6749 Section 3)
authorizationEndpoint: {
notNull: true,
type: "varchar",
params: {
length: 256
}
},
tokenEndpoint: {
notNull: true,
type: "varchar",
params: {
length: 256
}
},
userInfoEndpoint: {
type: "varchar",
params: {
length: 256
}
},
revokeEndpoint: {
type: "varchar",
params: {
length: 256
}
},
// 客户端凭证 (RFC 6749 Section 2.3)
clientId: {
notNull: true,
type: "varchar",
params: {
length: 128
}
},
clientSecret: {
notNull: true,
type: "varchar",
params: {
length: 128
}
},
redirectUri: {
notNull: true,
type: "varchar",
params: {
length: 256
}
},
scopes: {
type: "object"
},
// 配置选项
autoRegister: {
notNull: true,
type: "boolean"
},
ableState: {
type: "enum",
enumeration: ["enabled", "disabled"]
}
},
actionType: "crud",
actions: Action_1.actions
};