src/Synapse/OAuth2/ServerServiceProvider.php
protected function setFirewalls(Application $app)
    {
        $app->extend('security.firewalls', function ($firewalls, $app) {
            $logout = new RequestMatcher('^/oauth/logout', null, ['POST']);
            $oAuth  = new RequestMatcher('^/oauth');

            $breedFirewalls = [
                'oauth-logout' => [
                    'pattern' => $logout,
                    'oauth'   => true,
                ],
                'oauth-public' => [
                    'pattern'   => $oAuth,
                    'anonymous' => true,
                ],
            ];

            return array_merge($breedFirewalls, $firewalls);
        });
    }
protected function setFirewalls(Application $app)
    {
        $app->extend('security.firewalls', function ($firewalls, $app) {
            $logout = new RequestMatcher('^/oauth/logout', null, ['POST']);
            $oAuth  = new RequestMatcher('^/oauth');

            $breedFirewalls = [
                'oauth-logout' => [
                    'pattern' => $logout,
                    'oauth'   => true,
                ],
                'oauth-public' => [
                    'pattern'   => $oAuth,
                    'anonymous' => true,
                ],
            ];

            return array_merge($breedFirewalls, $firewalls);
        });
    }
protected function setFirewalls ( Application $ app ) { $ app -> extend ( 'security.firewalls' , function ( $ firewalls , $ app ) { $ logout = new RequestMatcher ( '^/oauth/logout' , null , [ 'POST' ] ) ; $ oAuth = new RequestMatcher ( '^/oauth' ) ; $ breedFirewalls = [ 'oauth-logout' => [ 'pattern' => $ logout , 'oauth' => true , ] , 'oauth-public' => [ 'pattern' => $ oAuth , 'anonymous' => true , ] , ] ; return array_merge ( $ breedFirewalls , $ firewalls ) ; } ) ; }
Set OAuth related firewalls

@param Application $app
Set OAuth related firewalls