From 7f938be344065fe279b8cd58fbe22752336451fc Mon Sep 17 00:00:00 2001 From: Matej Baco Date: Fri, 4 Feb 2022 16:37:47 +0100 Subject: [PATCH] Clde quality cleanup --- app/controllers/mock.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app/controllers/mock.php b/app/controllers/mock.php index 2b667ae7e2..ea437bf3c5 100644 --- a/app/controllers/mock.php +++ b/app/controllers/mock.php @@ -480,7 +480,7 @@ App::get('/v1/mock/tests/general/oauth2/token') ->label('sdk.mock', true) ->param('client_id', '', new Text(100), 'OAuth2 Client ID.') ->param('client_secret', '', new Text(100), 'OAuth2 scope list.') - ->param('grant_type', '', new WhiteList(['refresh_token', 'authorization_code']), 'OAuth2 Grant Type.', true) + ->param('grant_type', 'authorization_code', new WhiteList(['refresh_token', 'authorization_code']), 'OAuth2 Grant Type.', true) ->param('redirect_uri', '', new Host(['localhost']), 'OAuth2 Redirect URI.', true) ->param('code', '', new Text(100), 'OAuth2 state.', true) ->param('refresh_token', '', new Text(100), 'OAuth2 refresh token.', true) @@ -488,10 +488,6 @@ App::get('/v1/mock/tests/general/oauth2/token') ->action(function ($client_id, $client_secret, $grantType, $redirectURI, $code, $refreshToken, $response) { /** @var Appwrite\Utopia\Response $response */ - if(empty($grantType)) { - $grantType = 'authorization_code'; - } - if ($client_id != '1') { throw new Exception('Invalid client ID'); }