diff options
author | Morris Jobke <hey@morrisjobke.de> | 2018-12-07 15:35:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-07 15:35:24 +0100 |
commit | f7e471877995a222548b0a1674618a3e654b4656 (patch) | |
tree | fd736e36d8e6aa8255ac0f88141992da54bad432 /apps/oauth2/lib/Controller/OauthApiController.php | |
parent | cfcce69272ca684cad32843d780cd31d01038e72 (diff) | |
parent | b9ac258870314a60ca5326d822ca404a19497e6c (diff) | |
download | nextcloud-server-f7e471877995a222548b0a1674618a3e654b4656.tar.gz nextcloud-server-f7e471877995a222548b0a1674618a3e654b4656.zip |
Merge pull request #12910 from nextcloud/td/oauth/strict
Make OAuth2 app strict
Diffstat (limited to 'apps/oauth2/lib/Controller/OauthApiController.php')
-rw-r--r-- | apps/oauth2/lib/Controller/OauthApiController.php | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/apps/oauth2/lib/Controller/OauthApiController.php b/apps/oauth2/lib/Controller/OauthApiController.php index 73fed3654d5..b05d3781e5c 100644 --- a/apps/oauth2/lib/Controller/OauthApiController.php +++ b/apps/oauth2/lib/Controller/OauthApiController.php @@ -1,4 +1,5 @@ <?php +declare(strict_types=1); /** * @copyright Copyright (c) 2017 Lukas Reschke <lukas@statuscode.ch> * @@ -53,18 +54,7 @@ class OauthApiController extends Controller { /** @var Throttler */ private $throttler; - /** - * @param string $appName - * @param IRequest $request - * @param ICrypto $crypto - * @param AccessTokenMapper $accessTokenMapper - * @param ClientMapper $clientMapper - * @param TokenProvider $tokenProvider - * @param ISecureRandom $secureRandom - * @param ITimeFactory $time - * @param Throttler $throttler - */ - public function __construct($appName, + public function __construct(string $appName, IRequest $request, ICrypto $crypto, AccessTokenMapper $accessTokenMapper, @@ -94,7 +84,7 @@ class OauthApiController extends Controller { * @param string $client_secret * @return JSONResponse */ - public function getToken($grant_type, $code, $refresh_token, $client_id, $client_secret) { + public function getToken($grant_type, $code, $refresh_token, $client_id, $client_secret): JSONResponse { // We only handle two types if ($grant_type !== 'authorization_code' && $grant_type !== 'refresh_token') { |