loopback/lib
Miroslav Bajtoš c5145bdf34
Add support for scoped access tokens
Define a new property `AccessToken.scopes` to contain the list of
scopes granted to this access token.

Define a new remote method metadata `accessScopes` to contain a list
of scope name required by this method.

Define a special built-in scope name "DEFAULT" that's used when
a method/token does not provide any scopes. This allows access
tokens to grant access to both the default scope and any additional
custom scopes at the same time.

Modify the authorization algorithm to ensure that at least one
of the scopes required by a remote method is allowed by the scopes
granted to the requesting access token.

The "DEFAULT" scope preserve backwards compatibility because existing
remote methods with no `accessScopes` can be accessed by (existing)
access tokens with no `scopes` defined.

Impact on existing applications:

 - Database schema must be updated after upgrading the loopback version

 - If the application was already using a custom `AccessToken.scopes`
   property with a type different from an array, then the relevant code
   must be updated to work with the new type "array of strings".
2017-04-07 13:04:40 +02:00
..
connectors Upgrade eslint-config to 7.x 2017-01-06 12:12:35 +01:00
access-context.js Add support for scoped access tokens 2017-04-07 13:04:40 +02:00
application.js Add new event "remoteMethodAdded" 2017-03-31 15:32:19 +02:00
browser-express.js Update eslint to loopback config v5 2016-11-22 14:08:02 +01:00
builtin-models.js Deep-clone model settings in lib/builtin-models 2017-02-24 15:13:06 +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 Add new event "remoteMethodAdded" 2017-03-31 15:32:19 +02:00
persisted-model.js Allow custom properties of Change Model 2017-03-09 08:58:42 +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 Optimise replication 2017-02-22 15:12:54 +01:00