Commit Graph

1427 Commits

Author SHA1 Message Date
Pradnya Baviskar b27b13071a Add test case to demonstrate url-encoded http path 2015-01-23 18:34:13 +05:30
crandmck fc31f37a83 Fix JSdocs per #888 2015-01-22 17:01:31 -08:00
Miroslav Bajtoš 8f8db5b69a Merge pull request #1039 from PradnyaBaviskar/issue698
Add test case for loopback issue #698

Close #1039
2015-01-22 18:41:14 +01:00
Pradnya Baviskar 7dcc2fcb1c Add test case for loopback issue #698
Verify that the following model options change the HTTP path
where the model is exposed:

    { http: { path: 'domain/mymodels' } }
2015-01-22 18:40:47 +01:00
Miroslav Bajtoš a77b3bbac7 Remove usages of deprecated `req.param()`
Express has recently deprecated `req.param()` to force developers
to be explicit about the source of the value. To avoid deprecation
warnings, this commit replaces all calls of `req.param()` with a
simplified inline version.
2015-01-21 19:27:53 +01:00
Miroslav Bajtoš a0d9bb1b18 Merge pull request #979 from greaterweb/feature/globalize-error-messages
Feature: Globalize error messages

Close #979
2015-01-21 19:07:11 +01:00
Ron Edgecomb a028d9d198 Add error code property to known error responses.
Enhance the error objects with a `code` property containing
a machine-readable string code describing the error, for example
INVALID_TOKEN or USER_NOT_FOUND.

Also improve 404 error messages to include the model name.
2015-01-21 19:04:47 +01:00
Ritchie Martori 0b0927b56b Merge pull request #992 from TorchlightSoftware/repl-optimize
don't send queries to the DB when no changes are detected
2015-01-19 09:32:17 -08:00
Ryan Graham 8fa04fd32f Merge pull request #1015 from strongloop/feature/rmg-basic-auth-support
Extend AccessToken to parse Basic auth headers
2015-01-16 10:52:02 -08:00
Raymond Feng 045e7e771b Merge tag 'v2.10.2'
2.10.2

 * Make sure EXECUTE access type matches READ or WRITE (Raymond Feng)
2015-01-16 10:33:42 -08:00
Raymond Feng 1204f38f58 Merge branch 'release/2.10.2' into production 2015-01-16 10:33:40 -08:00
Raymond Feng 41d9bbb7df v2.10.2 2015-01-16 10:33:39 -08:00
Raymond Feng 07dffe7473 Merge pull request #1014 from strongloop/feature/fix-issue-1011
Make sure EXECUTE access type matches READ or WRITE
2015-01-16 10:28:51 -08:00
Ryan Graham 389b8c0e83 test: use 127.0.0.1 instead of localhost
More portable for dual-stack environments where localhost may mean
::1, which is the IPv6 equivalent of 127.0.0.1, but not actually the
same.
2015-01-15 22:53:09 -08:00
Ryan Graham fbb091e3b3 Extend AccessToken to parse Basic auth headers
Allow convenient URLs for curl and browsers such as:
 - http://some-long-token@localhost:3000/
 - http://token:some-long-token@localhost:3000/

Basic Auth specifies a 'Basic' scheme for the Authorization header
similar to how OAuth specifies 'Bearer' as an auth scheme.

Following a similar convention, extract the access token from the
Authorization header when it specifies the 'Basic' scheme, assuming
it is the larger of the <user>:<pass> segments.
2015-01-15 22:53:09 -08:00
Ryan Graham 83d8844b70 tests: fix Bearer token test 2015-01-15 22:53:09 -08:00
Raymond Feng 55bc20ee0d Merge tag 'v2.10.1'
2.10.1

 * Optimize the creation of handlers for rest (Raymond Feng)

 * Add a link to gitter chat (Raymond Feng)

 * Added context middleware (Rand McKinney)

 * Use User.remoteMethod instead of loopbacks method This is needed for loopback-connector-remote authorization. Addresses https://github.com/strongloop/loopback/issues/622. (Berkeley Martinez)
2015-01-15 13:57:16 -08:00
Raymond Feng 14da0d8c53 Merge branch 'release/2.10.1' into production 2015-01-15 13:57:14 -08:00
Raymond Feng e4dc893383 v2.10.1 2015-01-15 13:57:13 -08:00
Raymond Feng 9d746eca69 Merge pull request #998 from strongloop/feature/improve-perf
Optimize the creation of handlers for rest
2015-01-15 13:52:35 -08:00
Raymond Feng 982e495632 Optimize the creation of handlers for rest 2015-01-15 09:03:22 -08:00
Raymond Feng 563a06fa7e Make sure EXECUTE access type matches READ or WRITE
See https://github.com/strongloop/loopback/issues/1011
2015-01-14 13:38:44 -08:00
Ritchie Martori e0e9d6ecff Merge pull request #943 from BerkeleyTrue/refactor/user-remote-method
Use User.remoteMethod instead of loopbacks method
2015-01-13 10:20:43 -08:00
Raymond Feng 27a6c16c73 Add a link to gitter chat 2015-01-13 10:19:53 -08:00
bitmage c28698c1ba don't send queries to the DB when no changes are detected 2015-01-10 11:28:55 -07:00
Rand McKinney 32ed60904c Added context middleware 2015-01-08 15:24:20 -08:00
Raymond Feng 8de3c31c9b Merge tag 'v2.10.0'
2.10.0

 * Revert the peer dep change to avoid npm complaints (Raymond Feng)

 * Update strong-remoting dep (Raymond Feng)

 * Allow accessType per remote method (Raymond Feng)

 * API and REST tests added to ensure complete and valid credentials are supplied for verified error message to be returned  - tests added as suggested and fail under previous version of User model  - strongloop/loopback#931 (Ron Edgecomb)

 * Require valid login credentials before verified email check.  - strongloop/loopback#931. (Ron Edgecomb)
2015-01-07 21:54:14 -08:00
Raymond Feng 2c8287deb3 Merge branch 'release/2.10.0' into production 2015-01-07 21:54:13 -08:00
Raymond Feng 0fed971e30 v2.10.0 2015-01-07 21:54:11 -08:00
Raymond Feng 47c9147f03 Revert the peer dep change to avoid npm complaints 2015-01-07 21:53:34 -08:00
Raymond Feng 497678e4a1 Merge branch 'greaterweb-master' 2015-01-07 16:35:43 -08:00
Raymond Feng f5eac871fd Merge branch 'master' of https://github.com/greaterweb/loopback into greaterweb-master 2015-01-07 16:35:00 -08:00
Raymond Feng 065872847f Merge pull request #978 from strongloop/feature/add-access-type
Allow accessType per remote method
2015-01-07 14:53:11 -08:00
Raymond Feng 7f381a07d7 Update strong-remoting dep 2015-01-07 14:41:37 -08:00
Raymond Feng 16210e0f79 Allow accessType per remote method 2015-01-07 14:40:09 -08:00
Raymond Feng 1fec88fbb9 Merge tag 'v2.9.0'
2.9.0

 * Update juggler dep (Raymond Feng)

 * Fix Geo test cases (Raymond Feng)

 * Allow User.hashPassword/validatePassword to be overridden (Raymond Feng)
2015-01-07 14:04:33 -08:00
Raymond Feng 54c381a1ce Merge branch 'release/2.9.0' into production 2015-01-07 14:04:32 -08:00
Raymond Feng 6bde5c8d30 v2.9.0 2015-01-07 14:04:31 -08:00
Raymond Feng 543e640b5a Update juggler dep 2015-01-07 14:04:05 -08:00
Raymond Feng 90fd62ec0a Merge pull request #941 from strongloop/feature/workaround-issue-251
Allow User.hashPassword/validatePassword to be overridden
2015-01-07 14:01:03 -08:00
Miroslav Bajtoš c52ab296b8 Merge tag 'v2.8.8'
2.8.8

 * Fix context middleware to preserve domains (Pham Anh Tuan)

 * Additional password reset unit tests for API and REST  - strongloop/loopback#944 (Ron Edgecomb)

 * Small formatting update to have consistency with identical logic in other areas.   - strongloop/loopback#944 (Ron Edgecomb)

 * Simplify the API test for invalidCredentials (removed create), move above REST calls for better grouping of tests   - strongloop/loopback#944 (Ron Edgecomb)

 * Force request to send body as string, this ensures headers aren't automatically set to application/json  - strongloop/loopback#944 (Ron Edgecomb)

 * Ensure error checking logic is in place for all REST calls, expand formatting for consistency with existing instances.  - strongloop/loopback#944 (Ron Edgecomb)

 * Correct invalidCredentials so that it differs from validCredentialsEmailVerified, unit test now passes as desired.  - strongloop/loopback#944 (Ron Edgecomb)

 * Update to demonstrate unit test is actually failing due to incorrect values of invalidCredentials  - strongloop/loopback#944 (Ron Edgecomb)

 * fix jscs warning (Clark Wang)

 * fix nestRemoting is nesting hooks from other relations (Clark Wang)
2015-01-07 12:08:12 +01:00
Miroslav Bajtoš 0417e272e8 Merge branch 'release/2.8.8' into production 2015-01-07 12:08:09 +01:00
Miroslav Bajtoš fc60222569 v2.8.8 2015-01-07 12:08:07 +01:00
Miroslav Bajtoš 989abf6822 Merge pull request #885 from projectxmaker/master
MongoDB - loopback.getCurrentContext() returns null

Close #885
Fix #809
2015-01-07 10:58:09 +01:00
Pham Anh Tuan ca0208ddd9 Fix context middleware to preserve domains
When executing a request using a pooled connection, connectors
like MongoDB and/or MySQL rebind callbacks to the domain which
issued the request, as opposed to the domain which opened the pooled
connection.

This commit fixes the context middleware to play nicely with that
mechanism and preserve domain rebinds.
2015-01-07 10:56:10 +01:00
Raymond Feng 4a9c5b627c Fix Geo test cases 2015-01-06 16:03:37 -08:00
Raymond Feng b7db9808b2 Allow User.hashPassword/validatePassword to be overridden
See https://github.com/strongloop/loopback/issues/251
2015-01-06 16:03:30 -08:00
Raymond Feng d77c5fac1d Merge pull request #962 from clarkorz/fix/nestRemote-hooks
fix nestRemoting is nesting hooks from other relations
2015-01-06 15:29:15 -08:00
Raymond Feng f3f1298f3e Merge pull request #975 from greaterweb/fix/user-tests
Fix User Tests
2015-01-06 08:39:12 -08:00
Berkeley Martinez 4fc07fe125 Use User.remoteMethod instead of loopbacks method
This is needed for loopback-connector-remote authorization.
Addresses https://github.com/strongloop/loopback/issues/622.
2015-01-06 08:18:57 -08:00