Commit graph

16 commits

Author SHA1 Message Date
Jeremy Benoist b7dba18cb2
Cleanup 2022-11-23 15:51:33 +01:00
Jeremy Benoist 637f0df976
Cascade delete on oauth2 table when deleting a user 2019-05-10 20:36:45 +02:00
Jeremy Benoist 5419a8368e
Merge remote-tracking branch 'origin/master' into 2.4 2019-01-15 09:41:18 +01:00
Jeremy Benoist 3a2d4cf9fd
Cast client id to avoid PG error
If someone send a malformated client_id when trying to authenticate using the API we got a 500 if wallabag use postgres because the request send a string instead of an integer.
2019-01-09 23:31:14 +01:00
Jeremy Benoist 877787e5fe
Fix utf8mb4 on vendor tables
When creating the schema for test these tables use default length for
string: 255. Which fail when using utf8mb4.

> Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes

Also move the `setKeepStaticConnections` in before and after class to
avoid:

> SAVEPOINT DOCTRINE2_SAVEPOINT_2 does not exist

See https://github.com/dmaicher/doctrine-test-bundle#troubleshooting
2018-11-28 22:04:55 +01:00
Jeremy Benoist f808b01692
Add a real configuration for CS-Fixer 2017-07-01 09:52:38 +02:00
Jeremy Benoist 0c00e52516
Create a client when creating a user using the api
While creating a new user using the API, we also create a new client for the current user.
So the app which just create the user can use its newly created client to configure the app.

That new client is only return after creating the user.
When calling the endpoint /api/user to get user information, the new client information won’t be return.
2017-06-07 23:23:28 +02:00
Jeremy Benoist 3ef75cc4e3
Be consistent between migration & schema definition 2016-12-19 14:24:19 +01:00
Nicolas Lœuillet 23406ca3f1
Added relation between API Client and User
Fix #2062
2016-10-24 21:56:28 +02:00
Jeremy Benoist 8dc4cd0f25
Fix entities definition
As per Doctrine said in the debug tool bar:

- The field Wallabag\ApiBundle\Entity\Client#refreshTokens is on the inverse side of a bi-directional relationship, but the specified mappedBy association on the target-entity Wallabag\ApiBundle\Entity\RefreshToken#client does not contain the required 'inversedBy="refreshTokens"' attribute.

- The field Wallabag\ApiBundle\Entity\Client#accessTokens is on the inverse side of a bi-directional relationship, but the specified mappedBy association on the target-entity Wallabag\ApiBundle\Entity\AccessToken#client does not contain the required 'inversedBy="accessTokens"' attribute.
2016-10-09 20:51:37 +02:00
Jeremy Benoist ee32248f43
Ensure access_token are removed
When we remove the client, we should ensure that access_token are also removed.

To ensure that, I created a test that generated an access_token. So when we remove the client, this association should be cascaded and shouldn’t generate an error.

Also I moved some Api related stuff to the ApiBundle (like the developer controler and ClientType form)
2016-10-08 00:05:41 +02:00
Nicolas Lœuillet b0da721a52
Changed relation between API client and refresh token
Fix #2350
2016-10-03 21:39:01 +02:00
Thomas Citharel 9c545fe028
Added name on client
- Fix typos in field name
- Added migration for name field in API client table

Manually cherry-picked from PR
https://github.com/wallabag/wallabag/pull/2171
2016-08-22 20:18:27 +02:00
Jeremy Benoist 619cc45359 Symfony Upgrade Fixer FTW
symfony-upgrade-fixer fix src/Wallabag/
2016-01-15 09:35:38 +01:00
Nicolas Lœuillet 1210dae105 remove old implementation for login/register/recover 2015-10-03 13:31:48 +02:00
Nicolas Lœuillet fcb1fba5c2 * public registration
* remove WSSE implementation
* add oAuth2 implementation
2015-10-03 13:30:43 +02:00