loopback/lib
Eric 9fe084fffd Enable multiple user models
Allow LoopBack applications to configure multiple User models and share
the same AccessToken model.

To enable this feature:

1) In your custom AccessToken model:

 - add a new property "principalType" of type "string".
 - configure the relation "belongsTo user" as polymorphic,
   using "principalType" as the discriminator

2) In your User models:

 - Configure the "hasMany accessTokens" relation as polymorphic,
   using "principalType" as the discriminator

When creating custom Role and Principal instances, set your
User model's name as the value of "prinicipalType".
2017-02-02 09:42:30 +01:00
..
connectors Upgrade eslint-config to 7.x 2017-01-06 12:12:35 +01:00
access-context.js Enable multiple user models 2017-02-02 09:42:30 +01:00
application.js Fix connector naming in strict mode 2016-11-30 14:08:28 -05:00
browser-express.js Update eslint to loopback config v5 2016-11-22 14:08:02 +01:00
builtin-models.js Update eslint to loopback config v5 2016-11-22 14:08:02 +01:00
current-context.js Update eslint to loopback config v5 2016-11-22 14:08:02 +01:00
globalize.js Update eslint to loopback config v5 2016-11-22 14:08:02 +01:00
loopback.js Update eslint to loopback config v5 2016-11-22 14:08:02 +01:00
model.js Warn about injectOptionsFromRemoteContext 2017-01-09 14:45:23 +01:00
persisted-model.js Merge pull request #3047 from strongloop/forward-port/avoid-change-cleanup 2017-01-04 16:39:44 +01:00
registry.js Update eslint to loopback config v5 2016-11-22 14:08:02 +01:00
runtime.js Update eslint to loopback config v5 2016-11-22 14:08:02 +01:00
server-app.js Update eslint to loopback config v5 2016-11-22 14:08:02 +01:00
utils.js Update eslint to loopback config v5 2016-11-22 14:08:02 +01:00