Raymond Feng
78550a9bc5
Pass options from User.login to createAccessToken
...
It will allow subclass of User to create access token based on additional
properties such as 'scope'.
2015-03-02 14:48:08 -08:00
Miroslav Bajtoš
3c43eccac7
Merge pull request #1120 from PradnyaBaviskar/lb-issue-416
...
Fix "User.confirm" to always call afterRemote hook
Close #1120
2015-02-25 14:26:07 +01:00
Pradnya Baviskar
8766d4a68d
Fix "User.confirm" to always call afterRemote hook
...
Make the "redirect" parameter optional. When the parameter is not
specified, the server responds with an empty response (204). This allows
API clients to call the method without the need to handle redirects
and HTML responses.
Even when the "redirect" parameter is included, the builtin afterRemote
hook still calls next(), so that user-provided afterRemote hooks
are executed too.
2015-02-25 14:20:47 +01:00
Raymond Feng
13e618bff2
Skip hashing password if it's already hashed
...
See https://github.com/strongloop/loopback-datasource-juggler/issues/471
2015-02-24 16:36:51 -08:00
Miroslav Bajtoš
c2236c393b
Upgrade jscs to ~1.11 via grunt-jscs ^1.5
2015-02-20 15:31:15 +01:00
Raymond Feng
a18fa176a8
Fix the test case
2015-01-30 08:52:45 -08: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
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
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
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
Ron Edgecomb
62bb63b4f2
Additional password reset unit tests for API and REST
...
- strongloop/loopback#944
2015-01-06 10:31:53 -05:00
Ron Edgecomb
9ac620c113
Small formatting update to have consistency with identical logic in other areas.
...
- strongloop/loopback#944
2015-01-06 10:31:52 -05:00
Ron Edgecomb
36112d2b50
Simplify the API test for invalidCredentials (removed create), move above REST calls for better grouping of tests
...
- strongloop/loopback#944
2015-01-06 10:31:52 -05:00
Ron Edgecomb
e4a1baa4a3
Force request to send body as string, this ensures headers aren't automatically set to application/json
...
- strongloop/loopback#944
2015-01-06 10:31:52 -05:00
Ron Edgecomb
572a8bb423
Ensure error checking logic is in place for all REST calls, expand formatting for consistency with existing instances.
...
- strongloop/loopback#944
2015-01-06 10:31:52 -05:00
Ron Edgecomb
6de1da5d22
Correct invalidCredentials so that it differs from validCredentialsEmailVerified, unit test now passes as desired.
...
- strongloop/loopback#944
2015-01-06 10:31:52 -05:00
Ron Edgecomb
3b4cadf7a3
Update to demonstrate unit test is actually failing due to incorrect values of invalidCredentials
...
- strongloop/loopback#944
2015-01-06 10:31:52 -05:00
Ron Edgecomb
70f576b452
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
2015-01-05 18:40:59 -05:00
Clark Wang
2f9400fc87
fix User.settings.ttl can't be overridden in sub model
...
Signed-off-by: Clark Wang <clark.wangs@gmail.com>
2014-12-28 16:02:37 +08:00
Rob Halff
36e1f6840c
fix jscs errors
2014-11-21 03:35:36 +01:00
Rob Halff
918497c365
singlequote, semicolon & /*jshint -W030 */
2014-11-21 02:46:21 +01:00
Miroslav Bajtoš
fec8234c4c
Merge pull request #616 from jpizarrom/master
...
added email custom headers in user verify
2014-10-24 19:51:10 +02:00
Juan Pizarro
4098bec2c6
User: custom email headers in verify
2014-10-24 14:42:49 -03:00
Raymond Feng
b98ada282f
Merge pull request #660 from strongloop/feature/add-realm-support
...
Add realm support
2014-10-24 08:27:28 -07:00
Raymond Feng
46d1430023
Add realm support
2014-10-23 11:10:39 -07:00
Miroslav Bajtoš
b57cd3e409
User: fix `confirm` permissions
...
Enable authentication for all User unit-tests to check that the ACLs are
correctly configured.
Fix the rule for `confirm` - the correct permission is `ALLOW`, not
`ACL.ALLOW`.
2014-10-23 13:19:43 +02:00
Miroslav Bajtoš
b1e0edb22b
test: verify exported models
2014-10-14 08:58:17 +02:00
Alexander Ryzhikov
58538f02b7
user#login include server crash fix
...
Signed-off-by: Alexander Ryzhikov <coobaha@gmail.com>
2014-09-03 09:58:49 +04:00
Raymond Feng
567e2530d7
Build the email verification url from app context
...
https://github.com/strongloop/loopback/issues/408
2014-07-26 22:39:42 -07:00
Raymond Feng
335bae4b46
Merge branch 'master' into feature/fix-issue-377
2014-07-22 10:49:20 -07:00
Raymond Feng
21b8609ee2
Report error for User.confirm()
...
See https://github.com/strongloop/loopback/issues/377
2014-07-22 10:42:22 -07:00
Raymond Feng
74e9ff75e3
Merge pull request #385 from offlinehacker/master
...
Validate username uniqueness
2014-07-21 15:26:01 -07:00
Jaka Hudoklin
90094e5e86
Validate username uniqueness
...
Signed-off-by: Jaka Hudoklin <jakahudoklin@gmail.com>
2014-07-19 14:18:21 +02:00
Raymond Feng
e5b64c6143
Upgrade to nodemailer 1.0.1
2014-07-16 12:40:15 -07:00
Raymond Feng
7b36196561
Merge pull request #362 from strongloop/feature/remoting-add-remove
...
Add a test case for hasMany through add/remove remoting
2014-07-15 16:15:27 -07:00
Raymond Feng
54b13f4feb
Upgrade to loopback-datasource-juggler@1.7.0
2014-07-15 16:15:02 -07:00
Raymond Feng
76b6dc10d9
Add a test case for credentials/challenges
2014-07-15 08:20:47 -07:00
Raymond Feng
74a39f3fc2
Refactor email verification tests into a new group
2014-07-08 08:54:50 -07:00
Raymond Feng
0c67b1e781
Add an option to honor emailVerified
...
See https://github.com/strongloop/loopback/pull/215
2014-07-07 14:09:45 -07:00
Raymond Feng
6b4ebdf609
Allow the creation of access token to be overriden
2014-06-09 14:53:55 -07:00
Ritchie Martori
7eeed19bf0
Relax validation object test
2014-05-20 14:39:28 -07:00
Raymond Feng
89aa3595f5
Set the correct status code for User.login
...
See https://github.com/strongloop/loopback/issues/118
2014-02-28 13:19:52 -08:00
Raymond Feng
46b579dc4a
Make sure User/AccessToken relations are set up by default
...
User.login assumes the relation User.accessTokens exists
2014-02-14 10:31:30 -08:00
Miroslav Bajtoš
d6f0b5f5a6
Add `include=user` param to `User.login`
...
Allow LB clients to get details of the currently logged-in user
as part of the login response.
Improve method's `description` to mention this new option.
2014-01-30 18:09:54 +01:00
Ritchie Martori
86a85291ac
Fix user test race condition
2014-01-23 14:39:15 -08:00
Ritchie Martori
9f2651578b
fixup - Include accessToken in user logout tests
2013-12-17 21:34:30 -08:00
Ritchie Martori
af2b8dd4ff
Merge feature/password-reset
2013-12-06 17:35:14 -08:00
Raymond Feng
23add99f12
Fix the test assertion as the error message is changed.
2013-12-04 14:41:25 -08:00
Ritchie Martori
2f9403016c
Initial auth implementation
2013-11-22 12:26:59 -08:00
Ritchie Martori
e92c46a4e4
Add password reset
2013-11-20 14:20:47 -08:00