aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/ApiBundle/Repository
diff options
context:
space:
mode:
authorThomas Citharel <tcit@tcit.fr>2017-04-30 09:16:55 +0200
committerThomas Citharel <tcit@tcit.fr>2017-06-14 17:53:52 +0200
commit0f8268c93e6210d368f9dcd1900274871a9eacdf (patch)
tree251024ae114d2a14a67399ba28d02ddb6d031bad /src/Wallabag/ApiBundle/Repository
parentf93a3109a5f0999dbbd69131c9e5041c390120c9 (diff)
downloadwallabag-oauth-changes.tar.gz
wallabag-oauth-changes.tar.zst
wallabag-oauth-changes.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/Repository')
-rw-r--r--src/Wallabag/ApiBundle/Repository/AccessTokenRepository.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/Wallabag/ApiBundle/Repository/AccessTokenRepository.php b/src/Wallabag/ApiBundle/Repository/AccessTokenRepository.php
new file mode 100644
index 00000000..2b8d24df
--- /dev/null
+++ b/src/Wallabag/ApiBundle/Repository/AccessTokenRepository.php
@@ -0,0 +1,18 @@
1<?php
2
3namespace Wallabag\ApiBundle\Repository;
4
5use Doctrine\ORM\EntityRepository;
6
7
8class AccessTokenRepository extends EntityRepository
9{
10 public function findAppsByUser($userId)
11 {
12 $qb = $this->createQueryBuilder('a')
13 ->innerJoin('a.client', 'c')
14 ->addSelect('c')
15 ->where('a.user =:userId')->setParameter('userId', $userId);
16 return $qb->getQuery()->getResult();
17 }
18}