loopback/test
Aaron Buchanan 50e0e4808a
Fix user-literal rewrite for anonymous requests
Currently any `currentUserLiteral` routes when accessed with a bad
token throw a 500 due to a SQL error that is raised because
`Model.findById` is invoked with `id={currentUserLiteral}`
(`id=me` in our case) when the url rewrite fails.

This commit changes the token middleware to return 401 Not Authorized
when the client is requesting a currentUserLiteral route without
a valid access token.
2017-04-04 18:55:34 +02:00
..
e2e Backport separate error checking and done logic 2016-05-06 14:07:38 -07:00
fixtures Add app setting logoutSessionsOnSensitiveChanges 2017-01-20 12:57:23 +01:00
helpers Use English when running Mocha tests 2017-01-27 11:26:24 +01:00
util Backport of #2565 2016-07-29 11:39:47 -04:00
access-control.integration.js Upgrade loopback-testing to the latest ^1.4 2016-09-12 13:21:07 +02:00
access-token.test.js Fix user-literal rewrite for anonymous requests 2017-04-04 18:55:34 +02:00
acl.test.js Update tests to use registry for model creation 2016-09-27 16:44:01 -04:00
app.test.js Add app setting logoutSessionsOnSensitiveChanges 2017-01-20 12:57:23 +01:00
change-stream.test.js Update tests to use registry for model creation 2016-09-27 16:44:01 -04:00
change.test.js Backport separate error checking and done logic 2016-05-06 14:07:38 -07:00
checkpoint.test.js Backport separate error checking and done logic 2016-05-06 14:07:38 -07:00
context-options.test.js Add new flag injectOptionsFromRemoteContext 2017-01-05 10:18:56 +01:00
data-source.test.js Expose upsertWithWhere 2016-09-07 12:41:56 -04:00
email.test.js Support 'alias' in mail transport config. 2016-07-05 10:48:24 -05:00
error-handler.test.js Update dependencies to their latest versions 2016-08-05 10:54:42 +02:00
geo-point.test.js update/insert copyright notices 2016-05-03 17:10:46 -07:00
hidden-properties.test.js Update dependencies to their latest versions 2016-08-05 10:54:42 +02:00
integration.test.js Update tests to use registry for model creation 2016-09-27 16:44:01 -04:00
karma.conf.js Update dependencies to their latest versions 2016-08-05 10:54:42 +02:00
key-value-model.test.js KeyValueModel: add API for listing keys 2016-08-18 13:34:29 +02:00
loopback.test.js common: add KeyValueModel 2016-08-10 15:30:15 +02:00
memory.test.js Backport separate error checking and done logic 2016-05-06 14:07:38 -07:00
mocha.opts Use English when running Mocha tests 2017-01-27 11:26:24 +01:00
model.application.test.js Backport separate error checking and done logic 2016-05-06 14:07:38 -07:00
model.test.js Add app setting logoutSessionsOnSensitiveChanges 2017-01-20 12:57:23 +01:00
registries.test.js Update tests to use registry for model creation 2016-09-27 16:44:01 -04:00
relations.integration.js Update tests to use registry for model creation 2016-09-27 16:44:01 -04:00
remote-connector.test.js Add new flag injectOptionsFromRemoteContext 2017-01-05 10:18:56 +01:00
remoting-coercion.test.js Update tests to use registry for model creation 2016-09-27 16:44:01 -04:00
remoting.integration.js Add new flag injectOptionsFromRemoteContext 2017-01-05 10:18:56 +01:00
replication.rest.test.js Add app setting logoutSessionsOnSensitiveChanges 2017-01-20 12:57:23 +01:00
replication.test.js Add option disabling periodic change rectification 2016-12-21 15:39:08 +01:00
rest.middleware.test.js Add app setting logoutSessionsOnSensitiveChanges 2017-01-20 12:57:23 +01:00
role.test.js Role model: resolves related models by name 2017-01-25 11:02:55 +01:00
support.js Add app setting logoutSessionsOnSensitiveChanges 2017-01-20 12:57:23 +01:00
user.integration.js Fix logout to handle no or missing accessToken 2017-01-30 10:39:40 +01:00
user.test.js Forward options in prepareForTokenInvalidation 2017-03-24 15:01:05 +01:00