Girish Ramakrishnan
8fc44e6bc9
remove redundant checks
2016-06-03 19:08:47 -07:00
Girish Ramakrishnan
44f4872134
remove dead comments
2016-06-03 17:55:05 -07:00
Girish Ramakrishnan
49dd584a41
return expiresAt as ISO-string for API consistency
2016-06-03 10:11:09 -07:00
Girish Ramakrishnan
c1ded66c1a
make download_url a post route
2016-06-03 09:23:15 -07:00
Johannes Zellner
4df49a82e5
Some clientdb.TYPE_ oversight in clients.js
2016-06-03 15:28:04 +02:00
Johannes Zellner
92e6ee9539
The clientSecret is now only ever created in the clients.js
2016-06-03 15:11:08 +02:00
Johannes Zellner
3ad2a2a5ca
Fixup the unit tests
2016-06-03 15:07:44 +02:00
Johannes Zellner
226537de04
Move client TYPE_* to clients.js
2016-06-03 15:05:00 +02:00
Johannes Zellner
41b324eb2d
Remove clientdb usage in addons.js
2016-06-03 14:56:45 +02:00
Johannes Zellner
1360729e97
Don't use clientdb directly from auth.js and apptask.js
2016-06-03 14:52:59 +02:00
Johannes Zellner
725e1debcc
Provide getByAppIdAndType() by clients.js
2016-06-03 14:47:06 +02:00
Johannes Zellner
201efa70b7
use clients instead of clientdb in oauth2.js
2016-06-03 14:38:58 +02:00
Johannes Zellner
c52d0369fa
Provide better feedback on invalid scopes
2016-06-03 13:53:33 +02:00
Johannes Zellner
b4dfad3aa3
Fixup the unit tests after removing PREFIX_USER
2016-06-03 13:09:26 +02:00
Johannes Zellner
7667cdc66d
PREFIX_USER finally gone
2016-06-03 13:01:23 +02:00
Johannes Zellner
3a9a667890
Make all token grants without PREFIX_USER
2016-06-03 13:01:05 +02:00
Johannes Zellner
304cfed5a9
Result of password setting is now a plain token identifier
2016-06-03 13:00:07 +02:00
Johannes Zellner
778c583a52
Activation hands out a token without PREFIX_USER now
2016-06-03 12:59:13 +02:00
Johannes Zellner
f988bb4d14
Do not use PREFIX_USER for token managment
2016-06-03 12:58:39 +02:00
Johannes Zellner
7057f1aaa2
All token identifiers are now plain user ids
2016-06-03 12:54:59 +02:00
Johannes Zellner
e06f5f88b8
Remove the token types
2016-06-03 12:54:34 +02:00
Johannes Zellner
03cd3f0b6f
Remove attached tokenType on req.user
2016-06-03 12:53:11 +02:00
Johannes Zellner
615f875169
Remove PREFIX_DEV for developer tokens
2016-06-03 12:52:10 +02:00
Johannes Zellner
f27ba04a00
Add test case for developer tokens
2016-06-03 11:11:11 +02:00
Johannes Zellner
3e0006a327
Allow tokens with SCOPE_ROLE_SDK through without a password
2016-06-03 11:10:59 +02:00
Johannes Zellner
558ca42ae8
Issue developer tokens with SCOPE_ROLE_SDK
2016-06-03 11:10:22 +02:00
Johannes Zellner
9d8a803185
Handle scope roles in scope checks
2016-06-03 11:09:48 +02:00
Johannes Zellner
105047b0c4
Add SCOPE_ROLE_SDK
2016-06-03 11:08:35 +02:00
Johannes Zellner
e335aa5dee
Check for sdk token instead of token type DEV
2016-06-03 10:17:52 +02:00
Johannes Zellner
10163733db
Separate the scope checking
2016-06-03 10:10:58 +02:00
Girish Ramakrishnan
251fad8514
add test for groupIds in listing api
2016-06-03 00:14:52 -07:00
Girish Ramakrishnan
036740f97b
filter out correct fields in the route code
2016-06-03 00:04:17 -07:00
Girish Ramakrishnan
f4958d936c
return groupIds in get user route
2016-06-03 00:00:11 -07:00
Girish Ramakrishnan
80ca69a128
user.update does not need the user object
2016-06-02 23:53:06 -07:00
Girish Ramakrishnan
097d23c412
move logic to model code
2016-06-02 23:29:43 -07:00
Girish Ramakrishnan
13a1213b0d
make group listing API return member userIds
2016-06-02 21:07:33 -07:00
Girish Ramakrishnan
50c4e4c91e
log event only after lock is acquired
2016-06-02 19:26:58 -07:00
Girish Ramakrishnan
46441d1814
cloudron.update is not exposed
2016-06-02 19:23:21 -07:00
Girish Ramakrishnan
a4e73be834
pass auditSource for certificate renewal
2016-06-02 18:54:45 -07:00
Girish Ramakrishnan
6be0d0814d
pass auditSource from cron.js
2016-06-02 18:51:50 -07:00
Girish Ramakrishnan
e30d71921e
pass auditSource for app autoupdater
2016-06-02 18:49:56 -07:00
Girish Ramakrishnan
a49c78f32c
make box autoupdate generate eventlog
2016-06-02 18:47:09 -07:00
Girish Ramakrishnan
b077223e58
fix scope name
2016-06-02 17:49:54 -07:00
Girish Ramakrishnan
d2864dfe56
rename root scope to cloudron scope (for lack of better scope name)
2016-06-02 16:51:14 -07:00
Girish Ramakrishnan
6d08af35a8
give developer token root scope
2016-06-02 15:58:40 -07:00
Girish Ramakrishnan
54f9d653f7
fix error messages
2016-06-02 14:41:21 -07:00
Girish Ramakrishnan
8d65f93fa4
return error.message
2016-06-02 14:40:29 -07:00
Girish Ramakrishnan
462440bb30
do not check for password in profile route
...
This is already checked by the verifyPassword middleware based on
the token type.
When using dev tokens, this check barfs for lack of password field
even when none is required.
2016-06-02 14:26:01 -07:00
Girish Ramakrishnan
65261dc4d5
add time_zone setter route
2016-06-02 13:54:07 -07:00
Girish Ramakrishnan
28b3550214
use error.message
2016-06-02 13:00:23 -07:00