aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/oauth-client.js
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/oauth-client.js')
-rw-r--r--server/models/oauth-client.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/server/models/oauth-client.js b/server/models/oauth-client.js
index 15118591a..b56838d4c 100644
--- a/server/models/oauth-client.js
+++ b/server/models/oauth-client.js
@@ -1,11 +1,15 @@
1'use strict'
2
1module.exports = function (sequelize, DataTypes) { 3module.exports = function (sequelize, DataTypes) {
2 const OAuthClient = sequelize.define('OAuthClient', 4 const OAuthClient = sequelize.define('OAuthClient',
3 { 5 {
4 clientId: { 6 clientId: {
5 type: DataTypes.STRING 7 type: DataTypes.STRING,
8 allowNull: false
6 }, 9 },
7 clientSecret: { 10 clientSecret: {
8 type: DataTypes.STRING 11 type: DataTypes.STRING,
12 allowNull: false
9 }, 13 },
10 grants: { 14 grants: {
11 type: DataTypes.ARRAY(DataTypes.STRING) 15 type: DataTypes.ARRAY(DataTypes.STRING)
@@ -28,9 +32,6 @@ module.exports = function (sequelize, DataTypes) {
28 return OAuthClient 32 return OAuthClient
29} 33}
30 34
31// TODO: validation
32// OAuthClientSchema.path('clientSecret').required(true)
33
34// --------------------------------------------------------------------------- 35// ---------------------------------------------------------------------------
35 36
36function associate (models) { 37function associate (models) {