[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,19 @@
module.exports = (sequelize, DataTypes) => {
const OAuthClient = sequelize.define('oauth_client', {
client_id: {
type: DataTypes.STRING,
primaryKey: true
},
name: DataTypes.STRING,
scopes: DataTypes.STRING,
client_secret: DataTypes.STRING,
redirectUris: DataTypes.STRING
}, {})
OAuthClient.associate = function (models) {
OAuthClient.belongsTo(models.user)
}
return OAuthClient
}