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

66 lines
1.5 KiB
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.desc = void 0;
const Action_1 = require("./Action");
exports.desc = {
attributes: {
userId: {
type: "ref",
ref: "user"
},
applicationId: {
notNull: true,
type: "ref",
ref: "application"
},
providerConfigId: {
notNull: true,
type: "ref",
ref: "oauthProvider"
},
providerUserId: {
notNull: true,
type: "varchar",
params: {
length: 256
}
},
rawUserInfo: {
notNull: true,
type: "object"
},
// 令牌 10-21: 不知道为什么老超出,设置大一点
accessToken: {
notNull: true,
type: "varchar",
params: {
length: 1024
}
},
refreshToken: {
type: "varchar",
params: {
length: 1024
}
},
accessExpiresAt: {
notNull: true,
type: "datetime"
},
refreshExpiresAt: {
type: "datetime"
},
stateId: {
notNull: true,
type: "ref",
ref: "oauthState"
},
loadState: {
type: "enum",
enumeration: ["unload", "loaded"]
}
},
actionType: "crud",
actions: Action_1.actions
};