From 0f8268c93e6210d368f9dcd1900274871a9eacdf Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Sun, 30 Apr 2017 09:16:55 +0200 Subject: Add client_credentials as grant_type Therefore, username and password are no longer needed Signed-off-by: Thomas Citharel Allow to have global clients, auth through direct token or auth code and bring scopes Signed-off-by: Thomas Citharel fix review Signed-off-by: Thomas Citharel remove redirect uri requirement on specific clients add back password and depreciate it enforce state Signed-off-by: Thomas Citharel Allow apps to register themselves A handful of changes Signed-off-by: Thomas Citharel change timeout values Signed-off-by: Thomas Citharel set access_token lifetime to 1 year and double for refresh_token Signed-off-by: Thomas Citharel --- .../ApiBundle/Repository/AccessTokenRepository.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/Wallabag/ApiBundle/Repository/AccessTokenRepository.php (limited to 'src/Wallabag/ApiBundle/Repository') 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 @@ +createQueryBuilder('a') + ->innerJoin('a.client', 'c') + ->addSelect('c') + ->where('a.user =:userId')->setParameter('userId', $userId); + return $qb->getQuery()->getResult(); + } +} -- cgit v1.2.3