Skip to content

Commit

Permalink
Merge pull request #1 from olssonm/dev
Browse files Browse the repository at this point in the history
Minor edits.
  • Loading branch information
olssonm committed Aug 10, 2015
2 parents a81319e + aa32f7e commit fdd870b
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 11 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@

This package allows you to add a HTTP Basic Auth filter on your routes, without the need to actually use a database – which the Laravel default `auth.basic`-middleware relies on.

Perfect if you want to give for example clients access to your development site, and you have yet to set up your database and/or models. Or perhaps your site doesn't even use a database and you still wish to keep it protected.

![Screenshot](https://cloud.githubusercontent.com/assets/907114/9154094/a34c231a-3e80-11e5-81cc-993b844d6e2f.png)

Perfect if you want to give for example clients access to your development site, and you have yet to set up your database and/or models. Or perhaps your site doesn't even use a database and you still wish to keep it protected.

**Note**

While HTTP Basic Auth does give you a protection layer against unwanted visitors, it is still not strictly secure. If you are solely using this package for security, you should at least consider looking into Apache or Nginx rate-limiters to limit login attempts.
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
"require-dev": {
"phpunit/phpunit" : "4.*",
"scrutinizer/ocular": "~1.1",
"orchestra/testbench": "~3.0",
"mockery/mockery": "0.9.3"
"orchestra/testbench": "~3.0"
},
"autoload": {
"psr-4": {
Expand All @@ -41,7 +40,8 @@
},
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
"dev-master": "1.x-dev"
}
}
},
"minimum-stability": "stable"
}
15 changes: 11 additions & 4 deletions src/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,22 @@
* Configuration for the "HTTP Very Basic Auth"-middleware
*/
return [
// Environments where the middleware is active
'envs' => ['local', 'development', 'testing'],

// Username
'user' => 'admin',

// Password
'password' => 'admin123',

// Environments where the middleware is active
'envs' => [
'local',
'dev',
'development',
'staging',
'production',
'testing'
],

// Message to display if the user "opts out"/clicks "cancel"
'error_message' => 'You must supply your credentials to access this resource.'
'error_message' => 'You have to supply your credentials to access this resource.'
];
1 change: 0 additions & 1 deletion tests/VeryBasicAuthTests.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

use Illuminate\Http\Request;
use Illuminate\Http\JsonResponse;
use Mockery as m;

use Olssonm\VeryBasicAuth\Http\Middleware\VeryBasicAuth;

Expand Down

0 comments on commit fdd870b

Please sign in to comment.