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/TagRestController.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/TagRestController.php')
-rw-r--r-- | src/Wallabag/ApiBundle/Controller/TagRestController.php | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/Wallabag/ApiBundle/Controller/TagRestController.php b/src/Wallabag/ApiBundle/Controller/TagRestController.php index 354187a0..6f460a2d 100644 --- a/src/Wallabag/ApiBundle/Controller/TagRestController.php +++ b/src/Wallabag/ApiBundle/Controller/TagRestController.php | |||
@@ -3,6 +3,7 @@ | |||
3 | namespace Wallabag\ApiBundle\Controller; | 3 | namespace Wallabag\ApiBundle\Controller; |
4 | 4 | ||
5 | use Nelmio\ApiDocBundle\Annotation\ApiDoc; | 5 | use Nelmio\ApiDocBundle\Annotation\ApiDoc; |
6 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security; | ||
6 | use Symfony\Component\HttpFoundation\Request; | 7 | use Symfony\Component\HttpFoundation\Request; |
7 | use Symfony\Component\HttpFoundation\JsonResponse; | 8 | use Symfony\Component\HttpFoundation\JsonResponse; |
8 | use Wallabag\CoreBundle\Entity\Entry; | 9 | use Wallabag\CoreBundle\Entity\Entry; |
@@ -14,7 +15,7 @@ class TagRestController extends WallabagRestController | |||
14 | * Retrieve all tags. | 15 | * Retrieve all tags. |
15 | * | 16 | * |
16 | * @ApiDoc() | 17 | * @ApiDoc() |
17 | * | 18 | * @Security("has_role('ROLE_READ')") |
18 | * @return JsonResponse | 19 | * @return JsonResponse |
19 | */ | 20 | */ |
20 | public function getTagsAction() | 21 | public function getTagsAction() |
@@ -38,7 +39,7 @@ class TagRestController extends WallabagRestController | |||
38 | * {"name"="tag", "dataType"="string", "required"=true, "requirement"="\w+", "description"="Tag as a string"} | 39 | * {"name"="tag", "dataType"="string", "required"=true, "requirement"="\w+", "description"="Tag as a string"} |
39 | * } | 40 | * } |
40 | * ) | 41 | * ) |
41 | * | 42 | * @Security("has_role('ROLE_WRITE')") |
42 | * @return JsonResponse | 43 | * @return JsonResponse |
43 | */ | 44 | */ |
44 | public function deleteTagLabelAction(Request $request) | 45 | public function deleteTagLabelAction(Request $request) |
@@ -71,7 +72,7 @@ class TagRestController extends WallabagRestController | |||
71 | * {"name"="tags", "dataType"="string", "required"=true, "format"="tag1,tag2", "description"="Tags as strings (comma splitted)"} | 72 | * {"name"="tags", "dataType"="string", "required"=true, "format"="tag1,tag2", "description"="Tags as strings (comma splitted)"} |
72 | * } | 73 | * } |
73 | * ) | 74 | * ) |
74 | * | 75 | * @Security("has_role('ROLE_WRITE')") |
75 | * @return JsonResponse | 76 | * @return JsonResponse |
76 | */ | 77 | */ |
77 | public function deleteTagsLabelAction(Request $request) | 78 | public function deleteTagsLabelAction(Request $request) |
@@ -113,7 +114,7 @@ class TagRestController extends WallabagRestController | |||
113 | * {"name"="tag", "dataType"="integer", "requirement"="\w+", "description"="The tag"} | 114 | * {"name"="tag", "dataType"="integer", "requirement"="\w+", "description"="The tag"} |
114 | * } | 115 | * } |
115 | * ) | 116 | * ) |
116 | * | 117 | * @Security("has_role('ROLE_WRITE')") |
117 | * @return JsonResponse | 118 | * @return JsonResponse |
118 | */ | 119 | */ |
119 | public function deleteTagAction(Tag $tag) | 120 | public function deleteTagAction(Tag $tag) |
@@ -133,7 +134,7 @@ class TagRestController extends WallabagRestController | |||
133 | 134 | ||
134 | /** | 135 | /** |
135 | * Remove orphan tag in case no entries are associated to it. | 136 | * Remove orphan tag in case no entries are associated to it. |
136 | * | 137 | * @Security("has_role('ROLE_WRITE')") |
137 | * @param Tag|array $tags | 138 | * @param Tag|array $tags |
138 | */ | 139 | */ |
139 | private function cleanOrphanTag($tags) | 140 | private function cleanOrphanTag($tags) |