From 6b4632c3ad9810a424da71465bf22c2bb63aa4ad Mon Sep 17 00:00:00 2001 From: Graham Campbell Date: Sun, 4 Jan 2015 12:33:38 +0000 Subject: [PATCH 1/2] Fixed import order --- src/Http/Controllers/HomeController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Http/Controllers/HomeController.php b/src/Http/Controllers/HomeController.php index 12b428d1..def5dd47 100644 --- a/src/Http/Controllers/HomeController.php +++ b/src/Http/Controllers/HomeController.php @@ -5,8 +5,8 @@ namespace CachetHQ\Cachet\Http\Controllers; use CachetHQ\Cachet\Models\Component; use CachetHQ\Cachet\Models\Incident; use CachetHQ\Cachet\Models\Setting; -use Exception; use Carbon\Carbon; +use Exception; use GrahamCampbell\Binput\Facades\Binput; use GrahamCampbell\Markdown\Facades\Markdown; use Illuminate\Routing\Controller; From 207e9f9901adaae912c7c50359374c3703bc3fc8 Mon Sep 17 00:00:00 2001 From: Graham Campbell Date: Sun, 4 Jan 2015 12:33:57 +0000 Subject: [PATCH 2/2] Moved the api key auth to the http namespace --- app/config/packages/dingo/api/config.php | 2 +- src/{ => Http}/Auth/ApiKeyAuthenticator.php | 2 +- src/Providers/AuthServiceProvider.php | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) rename src/{ => Http}/Auth/ApiKeyAuthenticator.php (97%) diff --git a/app/config/packages/dingo/api/config.php b/app/config/packages/dingo/api/config.php index 5c1e2965..8e980234 100644 --- a/app/config/packages/dingo/api/config.php +++ b/app/config/packages/dingo/api/config.php @@ -82,7 +82,7 @@ return [ }, 'api_key' => function ($app) { - return new CachetHQ\Cachet\Auth\ApiKeyAuthenticator(); + return new CachetHQ\Cachet\Http\Auth\ApiKeyAuthenticator(); }, ], diff --git a/src/Auth/ApiKeyAuthenticator.php b/src/Http/Auth/ApiKeyAuthenticator.php similarity index 97% rename from src/Auth/ApiKeyAuthenticator.php rename to src/Http/Auth/ApiKeyAuthenticator.php index 64cd9711..844640c1 100644 --- a/src/Auth/ApiKeyAuthenticator.php +++ b/src/Http/Auth/ApiKeyAuthenticator.php @@ -1,6 +1,6 @@ app->bindShared('CachetHQ\Cachet\Auth\ApiKeyAuthenticator', function () { + $this->app->bindShared('CachetHQ\Cachet\Http\Auth\ApiKeyAuthenticator', function () { return new ApiKeyAuthenticator(); }); }