190 Commits

Author SHA1 Message Date
Simone Taeggi
e1a0ae803e Merge branch 'main' into features/api-token-v2 2022-09-08 22:16:55 +02:00
Alexandre Bodin
4e989321e3 Fix eslint core/admin 2022-09-05 16:15:21 +02:00
Ben Irvin
1e5f8e9fee fix test 2022-08-31 10:56:59 +02:00
Jean-Sébastien Herbaux
b9538ea7c3
Merge pull request #14247 from strapi/api-token-v2/throw-on-unknown-permission
Validate & throw on unknown permissions for API tokens
2022-08-31 10:34:32 +02:00
Convly
dc084f9102 Add missing await 2022-08-30 10:56:17 +02:00
Convly
bf5534d725 Test consistency 2022-08-29 18:03:43 +02:00
Convly
dfad26d2a2 Fix test 2022-08-29 18:03:04 +02:00
Convly
e7ca50f6b9 Validate permissions for api-tokens & throw on unknown permissions 2022-08-29 16:33:41 +02:00
Ben Irvin
3cd1a9b183
Merge branch 'features/api-token-v2' into api-token-v2/restrict-lifespans 2022-08-29 12:37:53 +02:00
Ben Irvin
0213ee2e1a
Merge pull request #14238 from strapi/api-token-v2/rename-api-token-permission
rename token-permission to api-token-permission
2022-08-29 12:35:21 +02:00
Ben Irvin
9aed7d9540 rename token-permission to api-token-permission 2022-08-29 09:17:31 +02:00
Ben Irvin
697662421f allow empty array of permissions 2022-08-26 16:11:08 +02:00
Ben Irvin
16537f199e validate lifespan 2022-08-26 15:27:47 +02:00
Ben Irvin
14c183ce51 validate lifespan 2022-08-26 10:33:18 +02:00
Convly
3568034cb4 Add test for create & update custom token permissions 2022-08-25 15:16:53 +02:00
Convly
8732d07555 Prevent duplicate permissions on create too 2022-08-25 14:25:09 +02:00
Convly
2c71d7d069 Fix permissions update for custom token (uniqueness) 2022-08-25 14:23:36 +02:00
Jean-Sébastien Herbaux
4c6c5e5218
Merge pull request #14214 from strapi/api-token-v2/fix-update-checks
Fix API tokens' update due to wrong enum values
2022-08-25 14:12:46 +02:00
Convly
46b28db877 Fix invalid enum value used to assert 'changingTypeToCustom' 2022-08-25 13:56:24 +02:00
Ben Irvin
2359ca1cc6 fix tests 2022-08-24 18:05:36 +02:00
Ben Irvin
574448deae remove comments 2022-08-24 16:27:48 +02:00
Ben Irvin
1bd9fbdd85 fix return type 2022-08-24 16:26:40 +02:00
Ben Irvin
43465af282 improve lifespan validation 2022-08-24 09:10:30 +02:00
Ben Irvin
3850c9452b Merge branch 'features/api-token-v2' into api-token-v2/backend-expirations 2022-08-24 09:00:04 +02:00
Ben Irvin
d4c3c6e9af Merge branch 'api-token-v2/fix-failing-e2e-tests' into api-token-v2/regenerate-tokens-api 2022-08-23 20:18:13 +02:00
Ben Irvin
7e446b7414 add token usage tests 2022-08-23 15:04:24 +02:00
Ben Irvin
8803dbbd46 fix tests 2022-08-23 14:14:04 +02:00
Ben Irvin
e54e5f7ddc fix lastUsedAt 2022-08-23 13:45:27 +02:00
Ben Irvin
36b53e8046 more tests and fixes 2022-08-23 12:53:20 +02:00
Ben Irvin
28f078be0a lifespan validation 2022-08-23 10:51:53 +02:00
Ben Irvin
0918729d21 Merge branch 'features/api-token-v2' into api-token-v2/backend-expirations 2022-08-22 17:54:33 +02:00
Ben Irvin
aa5a1c7ed7 regenerate throws on invalid id 2022-08-22 12:33:00 +02:00
Ben Irvin
ae90cf5fd0 Merge branch 'api-token-v2/regenerate-tokens-api' into api-token-v2/backend-expirations 2022-08-22 12:11:46 +02:00
Ben Irvin
a063f21474 jsdoc comments 2022-08-19 16:53:51 +02:00
Ben Irvin
c5eb2b1a9d rename mapTokenPermissions to flattenTokenPermissions 2022-08-19 16:45:16 +02:00
Ben Irvin
d4f03c7d56 declare functions before use 2022-08-19 16:42:55 +02:00
Ben Irvin
c6aef125c9 fix jsdoc params 2022-08-19 16:41:39 +02:00
Ben Irvin
e3961fb298 rename lastUsed to lastUsedAt 2022-08-19 16:36:28 +02:00
Ben Irvin
36d37706ce add lifespan and expiresAt fields 2022-08-19 16:33:58 +02:00
Ben Irvin
f30f25ecbe lint 2022-08-18 14:52:16 +02:00
Ben Irvin
9941198dac fix regeneration 2022-08-18 14:03:59 +02:00
Ben Irvin
7098ae95be Merge branch 'api-token-v2/backend/regenerate-token' into api-token-v2/regenerate-tokens-api 2022-08-18 13:48:06 +02:00
Ben Irvin
06d95419f4 add regeneration of tokens 2022-08-18 13:31:02 +02:00
Ben Irvin
21845bb0d0 remove lastUsed from create 2022-08-18 12:30:27 +02:00
Ben Irvin
b2b1432322 Merge branch 'features/api-token-v2' into api-token-v2/permissions-for-api-token 2022-08-18 12:20:45 +02:00
Ben Irvin
9de7791fad cleanup 2022-08-18 11:53:30 +02:00
Bassel Kanso
baad6fd93f Merge branch 'main' into features/api-token-v2 2022-08-18 12:18:09 +03:00
Ben Irvin
e28c9e7ec9 add lastUsed 2022-08-18 10:22:09 +02:00
Ben Irvin
88c243243d make error message unique 2022-08-16 10:18:41 +02:00
Ben Irvin
0972919247 list and get should return array of action strings 2022-08-12 09:52:47 +02:00