diff options
author | Thomas Citharel <tcit@tcit.fr> | 2017-04-30 09:16:55 +0200 |
---|---|---|
committer | Thomas Citharel <tcit@tcit.fr> | 2017-06-14 17:53:52 +0200 |
commit | 0f8268c93e6210d368f9dcd1900274871a9eacdf (patch) | |
tree | 251024ae114d2a14a67399ba28d02ddb6d031bad /src/Wallabag/ApiBundle/Controller/AnnotationRestController.php | |
parent | f93a3109a5f0999dbbd69131c9e5041c390120c9 (diff) | |
download | wallabag-0f8268c93e6210d368f9dcd1900274871a9eacdf.tar.gz wallabag-0f8268c93e6210d368f9dcd1900274871a9eacdf.tar.zst wallabag-0f8268c93e6210d368f9dcd1900274871a9eacdf.zip |
Add client_credentials as grant_typeoauth-changes
Therefore, username and password are no longer needed
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
Allow to have global clients, auth through direct token or auth code and bring scopes
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
fix review
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
remove redirect uri requirement on specific clients
add back password and depreciate it
enforce state
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
Allow apps to register themselves
A handful of changes
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
change timeout values
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
set access_token lifetime to 1 year and double for refresh_token
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
Diffstat (limited to 'src/Wallabag/ApiBundle/Controller/AnnotationRestController.php')
-rw-r--r-- | src/Wallabag/ApiBundle/Controller/AnnotationRestController.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/Wallabag/ApiBundle/Controller/AnnotationRestController.php b/src/Wallabag/ApiBundle/Controller/AnnotationRestController.php index 2dd26c07..c524a24c 100644 --- a/src/Wallabag/ApiBundle/Controller/AnnotationRestController.php +++ b/src/Wallabag/ApiBundle/Controller/AnnotationRestController.php | |||
@@ -4,6 +4,7 @@ namespace Wallabag\ApiBundle\Controller; | |||
4 | 4 | ||
5 | use Nelmio\ApiDocBundle\Annotation\ApiDoc; | 5 | use Nelmio\ApiDocBundle\Annotation\ApiDoc; |
6 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; | 6 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; |
7 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security; | ||
7 | use Symfony\Component\HttpFoundation\Request; | 8 | use Symfony\Component\HttpFoundation\Request; |
8 | use Symfony\Component\HttpFoundation\JsonResponse; | 9 | use Symfony\Component\HttpFoundation\JsonResponse; |
9 | use Wallabag\CoreBundle\Entity\Entry; | 10 | use Wallabag\CoreBundle\Entity\Entry; |
@@ -21,7 +22,7 @@ class AnnotationRestController extends WallabagRestController | |||
21 | * ) | 22 | * ) |
22 | * | 23 | * |
23 | * @param Entry $entry | 24 | * @param Entry $entry |
24 | * | 25 | * @Security("has_role('ROLE_READ')") |
25 | * @return JsonResponse | 26 | * @return JsonResponse |
26 | */ | 27 | */ |
27 | public function getAnnotationsAction(Entry $entry) | 28 | public function getAnnotationsAction(Entry $entry) |
@@ -46,7 +47,7 @@ class AnnotationRestController extends WallabagRestController | |||
46 | * | 47 | * |
47 | * @param Request $request | 48 | * @param Request $request |
48 | * @param Entry $entry | 49 | * @param Entry $entry |
49 | * | 50 | * @Security("has_role('ROLE_WRITE')") |
50 | * @return JsonResponse | 51 | * @return JsonResponse |
51 | */ | 52 | */ |
52 | public function postAnnotationAction(Request $request, Entry $entry) | 53 | public function postAnnotationAction(Request $request, Entry $entry) |
@@ -72,7 +73,7 @@ class AnnotationRestController extends WallabagRestController | |||
72 | * | 73 | * |
73 | * @param Annotation $annotation | 74 | * @param Annotation $annotation |
74 | * @param Request $request | 75 | * @param Request $request |
75 | * | 76 | * @Security("has_role('ROLE_WRITE')") |
76 | * @return JsonResponse | 77 | * @return JsonResponse |
77 | */ | 78 | */ |
78 | public function putAnnotationAction(Annotation $annotation, Request $request) | 79 | public function putAnnotationAction(Annotation $annotation, Request $request) |
@@ -97,7 +98,7 @@ class AnnotationRestController extends WallabagRestController | |||
97 | * @ParamConverter("annotation", class="WallabagAnnotationBundle:Annotation") | 98 | * @ParamConverter("annotation", class="WallabagAnnotationBundle:Annotation") |
98 | * | 99 | * |
99 | * @param Annotation $annotation | 100 | * @param Annotation $annotation |
100 | * | 101 | * @Security("has_role('ROLE_WRITE')") |
101 | * @return JsonResponse | 102 | * @return JsonResponse |
102 | */ | 103 | */ |
103 | public function deleteAnnotationAction(Annotation $annotation) | 104 | public function deleteAnnotationAction(Annotation $annotation) |