[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,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
}