100 lines
2.1 KiB
JavaScript
100 lines
2.1 KiB
JavaScript
import { actions } from "./Action";
|
|
export const desc = {
|
|
attributes: {
|
|
systemId: {
|
|
notNull: true,
|
|
type: "ref",
|
|
ref: "system"
|
|
},
|
|
name: {
|
|
notNull: true,
|
|
type: "varchar",
|
|
params: {
|
|
length: 64
|
|
}
|
|
},
|
|
type: {
|
|
notNull: true,
|
|
type: "varchar",
|
|
params: {
|
|
length: 64
|
|
}
|
|
},
|
|
logo: {
|
|
type: "varchar",
|
|
params: {
|
|
length: 512
|
|
}
|
|
},
|
|
// OAuth 端点 (RFC 6749 Section 3)
|
|
authorizationEndpoint: {
|
|
notNull: true,
|
|
type: "varchar",
|
|
params: {
|
|
length: 512
|
|
}
|
|
},
|
|
tokenEndpoint: {
|
|
notNull: true,
|
|
type: "varchar",
|
|
params: {
|
|
length: 512
|
|
}
|
|
},
|
|
userInfoEndpoint: {
|
|
type: "varchar",
|
|
params: {
|
|
length: 512
|
|
}
|
|
},
|
|
revokeEndpoint: {
|
|
type: "varchar",
|
|
params: {
|
|
length: 512
|
|
}
|
|
},
|
|
refreshEndpoint: {
|
|
type: "varchar",
|
|
params: {
|
|
length: 512
|
|
}
|
|
},
|
|
// 客户端凭证 (RFC 6749 Section 2.3)
|
|
clientId: {
|
|
notNull: true,
|
|
type: "varchar",
|
|
params: {
|
|
length: 512
|
|
}
|
|
},
|
|
clientSecret: {
|
|
notNull: true,
|
|
type: "varchar",
|
|
params: {
|
|
length: 512
|
|
}
|
|
},
|
|
redirectUri: {
|
|
notNull: true,
|
|
type: "varchar",
|
|
params: {
|
|
length: 512
|
|
}
|
|
},
|
|
scopes: {
|
|
type: "object"
|
|
},
|
|
// 配置选项
|
|
autoRegister: {
|
|
notNull: true,
|
|
type: "boolean"
|
|
},
|
|
ableState: {
|
|
type: "enum",
|
|
enumeration: ["enabled", "disabled"]
|
|
}
|
|
},
|
|
actionType: "crud",
|
|
actions
|
|
};
|