[oauth] start oauth auth_code server implementation
This commit is contained in:
15
server/api/models/oauth_token.js
Normal file
15
server/api/models/oauth_token.js
Normal file
@@ -0,0 +1,15 @@
|
||||
|
||||
module.exports = (sequelize, DataTypes) => {
|
||||
const OAuthToken = sequelize.define('oauth_token', {
|
||||
access_token: DataTypes.STRING,
|
||||
refresh_token: DataTypes.STRING,
|
||||
scope: DataTypes.STRING,
|
||||
}, {})
|
||||
|
||||
OAuthToken.associate = function (models) {
|
||||
OAuthToken.belongsTo(models.user)
|
||||
OAuthToken.belongsTo(models.oauth_client)
|
||||
}
|
||||
|
||||
return OAuthToken
|
||||
}
|
||||
Reference in New Issue
Block a user