diff --git a/lib/models/acl.js b/lib/models/acl.js index 6b3f6d46..db341f62 100644 --- a/lib/models/acl.js +++ b/lib/models/acl.js @@ -40,4 +40,6 @@ var ACLSchema = { status: String, // Enabled/disabled created: Date, lastUpdated: Date -} \ No newline at end of file +} + +// readAccess, writeAccess --> public, userId, role \ No newline at end of file diff --git a/lib/models/application.js b/lib/models/application.js index 173d2b97..b19b445b 100644 --- a/lib/models/application.js +++ b/lib/models/application.js @@ -1,17 +1,26 @@ -// Application model +/** + * Data model for Application + */ var ApplicationSchema = { // Basic information id: {type: String, required: true}, name: {type: String, required: true}, description: String, // description - icon: String, // The icon url - public: Boolean, + icon: String, // The icon image url + + public: Boolean, // Do we list the application in the public catalog? permissions: [String], - userId: String, + owner: String, // The user id of the developer who registers the application + collaborators: [String], // A list of users ids who have permissions to work on this app - status: String, + // EMail + email: String, // e-mail address + emailVerified: Boolean, // Is the e-mail verified + + + status: String, // Status of the application, enabled/disabled // Keys clientKey: String, @@ -24,18 +33,24 @@ var ApplicationSchema = { pushPlatforms: [String], pushCredentials: [], - // Authentication + // User Authentication authenticationEnabled: Boolean, anonymousAllowed: Boolean, schemes: [String], // Basic, facebook, github, google attachedCredentials: [], - // email - email: String, // e-mail address - emailVerified: Boolean, // Is the e-mail verified - - collaborators: [String], // A list of users ids who have permissions to work on this app created: Date, lastUpdated: Date }; + + +/** + * Application management functions + */ + +// Register a new application + + + + diff --git a/lib/models/installation.js b/lib/models/installation.js index 03d1b0ed..a734dc64 100644 --- a/lib/models/installation.js +++ b/lib/models/installation.js @@ -1,4 +1,17 @@ // See Device registration var InstallationSchema = { - + id: { + type: String, + required: true, + id: 1 + }, + appId: String, + appVersion: String, + userId: String, + deviceToken: String, + deviceType: String, + subscriptions: [String], + created: Date, + lastModified: Date, + status: String }; diff --git a/lib/models/role.js b/lib/models/role.js index 0bd17dae..74421708 100644 --- a/lib/models/role.js +++ b/lib/models/role.js @@ -1,10 +1,10 @@ // Role model var RoleSchema = { id: {type: String, required: true}, - name: {type: String, required: true}, + name: {type: String, required: true}, // The name of a role + description: String, roles: [String], // A role can be an aggregate of other roles users: [String], // A role contains a list of users - created: Date, lastUpdated: Date } \ No newline at end of file diff --git a/lib/models/user.js b/lib/models/user.js index 545e772c..0f170093 100644 --- a/lib/models/user.js +++ b/lib/models/user.js @@ -1,3 +1,24 @@ +/** + * User Model + Active User + Explicit vs. Implicit + Signup + Removing the User from the System + Login + Logout + User Management + Email Verification + Password Reset + Forgot Username + Using Social Identities + Facebook + Google+ + LinkedIn + Twitter + User Discovery + Username Existence Check + * @type {{question: *, answer: *}} + */ var ChallengeSchema = { // id: String, question: String,