oak-pay-business/lib/oak-app-domain/OauthAuthorizationCode/Storage.js

66 lines
1.5 KiB
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.desc = void 0;
const action_1 = require("oak-domain/lib/actions/action");
exports.desc = {
attributes: {
code: {
notNull: true,
type: "varchar",
params: {
length: 128
}
},
applicationId: {
notNull: true,
type: "ref",
ref: "application"
},
oauthAppId: {
notNull: true,
type: "ref",
ref: "oauthApplication"
},
userId: {
notNull: true,
type: "ref",
ref: "user"
},
redirectUri: {
notNull: true,
type: "varchar",
params: {
length: 512
}
},
scope: {
notNull: true,
type: "object"
},
// PKCE 扩展 (RFC 7636) 暂时用不到
codeChallenge: {
type: "varchar",
params: {
length: 128
}
},
codeChallengeMethod: {
type: "varchar",
params: {
length: 10
}
},
// 生命周期管理
expiresAt: {
notNull: true,
type: "datetime"
},
// 使用时间
usedAt: {
type: "datetime"
}
},
actionType: "crud",
actions: action_1.genericActions
};