diff options
| author | Abe Massry <a@abemassry.com> | 2017-12-01 02:28:16 +0300 |
|---|---|---|
| committer | Brent Shaffer <betterbrent@google.com> | 2017-12-01 02:28:16 +0300 |
| commit | 3bbfb19c2a4c55a6eda34800832118a31a42e18d (patch) | |
| tree | ba04074fa744259cf76f5da20eae3ae87f126adb | |
| parent | c5cdd7df2e415167b4231dc371582ec275980334 (diff) | |
| download | oauth2-server-php-v2.x.tar.xz | |
fix AuthorizeController scope error field (#870)v2.x
| -rw-r--r-- | src/OAuth2/Controller/AuthorizeController.php | 2 | ||||
| -rw-r--r-- | test/OAuth2/Controller/AuthorizeControllerTest.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/OAuth2/Controller/AuthorizeController.php b/src/OAuth2/Controller/AuthorizeController.php index 4bafb1d..eb87d97 100644 --- a/src/OAuth2/Controller/AuthorizeController.php +++ b/src/OAuth2/Controller/AuthorizeController.php @@ -318,7 +318,7 @@ class AuthorizeController implements AuthorizeControllerInterface $defaultScope = $this->scopeUtil->getDefaultScope($client_id); if (false === $defaultScope) { - $response->setRedirect($this->config['redirect_status_code'], $redirect_uri, $state, 'invalid_client', 'This application requires you specify a scope parameter', null); + $response->setRedirect($this->config['redirect_status_code'], $redirect_uri, $state, 'invalid_scope', 'This application requires you specify a scope parameter', null); return false; } diff --git a/test/OAuth2/Controller/AuthorizeControllerTest.php b/test/OAuth2/Controller/AuthorizeControllerTest.php index fe3553b..0b15504 100644 --- a/test/OAuth2/Controller/AuthorizeControllerTest.php +++ b/test/OAuth2/Controller/AuthorizeControllerTest.php @@ -154,7 +154,7 @@ class AuthorizeControllerTest extends TestCase $parts = parse_url($response->getHttpHeader('Location')); parse_str($parts['query'], $query); - $this->assertEquals($query['error'], 'invalid_client'); + $this->assertEquals($query['error'], 'invalid_scope'); $this->assertEquals($query['error_description'], 'This application requires you specify a scope parameter'); $request->query['scope'] = 'testscope'; |
