diff --git a/composer.json b/composer.json index b0c20c3..28089fe 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ } ], "require": { - "illuminate/support": ">=5.8 || ^6.0", + "illuminate/support": ">=5.8 || ^6.0 || ^7.0", "php" : "^7.1" }, "require-dev": { diff --git a/src/Http/Middleware/VeryBasicAuth.php b/src/Http/Middleware/VeryBasicAuth.php index 571b9bf..ed6af83 100644 --- a/src/Http/Middleware/VeryBasicAuth.php +++ b/src/Http/Middleware/VeryBasicAuth.php @@ -14,13 +14,13 @@ class VeryBasicAuth public function handle($request, Closure $next, $username = null, $password = null) { // Check if middleware is in use in current environment - if(count(array_intersect(['*', app()->environment()], config('very_basic_auth.envs'))) > 0) { + if (count(array_intersect(['*', app()->environment()], config('very_basic_auth.envs'))) > 0) { $authUsername = (empty($username)) ? config('very_basic_auth.user') : $username; $authPassword = (empty($password)) ? config('very_basic_auth.password') : $password; // Check for credentials - if($request->getUser() !== $authUsername || $request->getPassword() !== $authPassword) { + if ($request->getUser() !== $authUsername || $request->getPassword() !== $authPassword) { // Build header $header = ['WWW-Authenticate' => sprintf('Basic realm="%s", charset="UTF-8"', config('very_basic_auth.realm', 'Basic Auth'))]; diff --git a/src/VeryBasicAuthServiceProvider.php b/src/VeryBasicAuthServiceProvider.php index c772ddb..2429ecf 100644 --- a/src/VeryBasicAuthServiceProvider.php +++ b/src/VeryBasicAuthServiceProvider.php @@ -28,7 +28,7 @@ public function __construct($app) { $this->stub = __DIR__ . '/config.stub'; // Check that config-file exists - if(!file_exists($this->config)) { + if (!file_exists($this->config)) { $this->createConfig(); }