diff --git a/config/bootstrap.php b/config/routes.php similarity index 82% rename from config/bootstrap.php rename to config/routes.php index 5076ef1..c000885 100644 --- a/config/bootstrap.php +++ b/config/routes.php @@ -9,13 +9,13 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ use Cake\Core\Configure; -use Cake\Routing\Router; +use Cake\Routing\RouteBuilder; Configure::load('CakeDC/Auth.auth'); $oauthPath = Configure::read('OAuth.path'); if (is_array($oauthPath)) { - Router::scope('/auth', function ($routes) use ($oauthPath) { - $routes->connect( + $routes->scope('/auth', function (RouteBuilder $builder) use ($oauthPath) { + $builder->connect( '/:provider', $oauthPath, ['provider' => implode('|', array_keys(Configure::read('OAuth.providers')))]