Skip to content

Commit

Permalink
Merge pull request #43 from olssonm/laravel-7
Browse files Browse the repository at this point in the history
Emergency-fix for composer.
  • Loading branch information
olssonm authored Mar 5, 2020
2 parents 748b195 + 408a317 commit 03fa6bf
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
}
],
"require": {
"illuminate/support": ">=5.8 || ^6.0",
"illuminate/support": ">=5.8 || ^6.0 || ^7.0",
"php" : "^7.1"
},
"require-dev": {
Expand Down
4 changes: 2 additions & 2 deletions src/Http/Middleware/VeryBasicAuth.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'))];
Expand Down
2 changes: 1 addition & 1 deletion src/VeryBasicAuthServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down

0 comments on commit 03fa6bf

Please sign in to comment.