mostbyte / auth
Mostbyte authorization system from identity service
Installs: 325
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/mostbyte/auth
Requires
- php: ^8.2
- guzzlehttp/guzzle: ^7.8
- illuminate/contracts: ^11.0|^12.0
- illuminate/database: ^11.0|^12.0
- illuminate/support: ^11.0|^12.0
Requires (Dev)
- orchestra/testbench: ^9.0
- phpunit/phpunit: ^11.0
README
Mostbyte authorization system from identity service
Versions
| Laravel | Auth |
|---|---|
| < 10.x | 2.x |
| 11.x,12.x | 3.x |
Installation
To get the latest version of Mostbyte auth, simply require the project using Composer
composer require mostbyte/auth
Instead, you may of course manually update your require block and run composer update if you so choose:
{
"require": {
"mostbyte/auth": "^3.0"
}
}
Publishing config files
php artisan vendor:publish --provider="Mostbyte\Auth\AuthServiceProvider"
Warning: In production, in
.envyou should specifyLOCAL_DEVELOPMENT=false. Otherwise your all http requests will be handled by faker
Using
Using in routes
use Mostbyte\Auth\Middleware\IdentityAuth; Route::middleware(IdentityAuth::class)->get("foo", function () { return "bar"; });
or specify in App\Http\Kernel.php
protected $middlewareAliases = [ // other middlewares... "identity" => \Mostbyte\Auth\Middleware\IdentityAuth::class ];
and in routes
Route::middleware('identity')->get("foo", function () { return "bar"; });