Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Checking the scopes are not Working #11

Open
Irtizashahid opened this issue Aug 3, 2015 · 0 comments
Open

Checking the scopes are not Working #11

Irtizashahid opened this issue Aug 3, 2015 · 0 comments

Comments

@Irtizashahid
Copy link

my config/oauth2.php file

 'scope_param' => true,
 'default_scope' => 'basic',

routes.php Source

$app->group(['prefix' => 'api', 'middleware' => 'oauth:clientscope1'], function($app)
{
    $app->get('resource', function() {
        return response()->json([
            "id" => 1,
            "name" => "A resource"
        ]);
    });
});

Error log

ErrorException in Application.php line 1300: Undefined index: oauth:clientscope1

    in Application.php line 1300
    at Application->Laravel\Lumen\{closure}('8', 'Undefined index: oauth:clientscope1', '/opt/lampp/htdocs/lumenoauth/vendor/laravel/lumen-framework/src/Application.php', '1300', array('name' => 'oauth:clientscope1')) in Application.php line 1300
    at Application->Laravel\Lumen\{closure}('oauth:clientscope1')
    at array_map(object(Closure), array('oauth:clientscope1')) in Application.php line 1301
    at Application->gatherMiddlewareClassNames('oauth:clientscope1') in Application.php line 1164
    at Application->handleFoundRoute(array(true, array(object(Closure), 'middleware' => 'oauth:clientscope1'), array())) in Application.php line 1093
    at Application->Laravel\Lumen\{closure}(object(Request))
    at call_user_func(object(Closure), object(Request)) in Pipeline.php line 141
    at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in AddQueuedCookiesToResponse.php line 36
    at AddQueuedCookiesToResponse->handle(object(Request), object(Closure)) in Pipeline.php line 125
    at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in OAuthExceptionHandlerMiddleware.php line 19
    at OAuthExceptionHandlerMiddleware->handle(object(Request), object(Closure)) in Pipeline.php line 125
    at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
    at call_user_func(object(Closure), object(Request)) in Pipeline.php line 101
    at Pipeline->then(object(Closure)) in Application.php line 1317
    at Application->sendThroughPipeline(array('LucaDegasperi\OAuth2Server\Middleware\OAuthExceptionHandlerMiddleware', 'Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse'), object(Closure)) in Application.php line 1099
    at Application->dispatch(object(Request)) in Application.php line 1037
    at Application->run(object(Request)) in index.php line 34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant