[oauth] start oauth auth_code server implementation
This commit is contained in:
18
server/api/models/oauth_code.js
Normal file
18
server/api/models/oauth_code.js
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user