Clde quality cleanup
This commit is contained in:
parent
e42c012961
commit
7f938be344
1 changed files with 1 additions and 5 deletions
|
@ -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');
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue