[oauth] start oauth auth_code server implementation

This commit is contained in:
les
2019-12-26 11:46:21 +01:00
parent c510541c50
commit 7ab81be418
17 changed files with 1631 additions and 838 deletions

View File

@@ -0,0 +1,18 @@
module.exports = (sequelize, DataTypes) => {
const OAuthCode = sequelize.define('oauth_code', {
authorizationCode: {
type: DataTypes.STRING,
primaryKey: true
},
scope: DataTypes.STRING,
redirect_uri: DataTypes.STRING
}, {})
OAuthCode.associate = function (models) {
OAuthCode.belongsTo(models.user)
OAuthCode.belongsTo(models.oauth_client)
}
return OAuthCode
}