The Playground authentication and authorization package for Laravel applications.
gammamatrix/playground-auth is a Laravel package for the playground authentication and authorization package for laravel applications..
It currently has 0 GitHub stars and 671 downloads on Packagist.
Install it with composer require gammamatrix/playground-auth.
Discover more Laravel packages by gammamatrix
or browse all Laravel packages to compare alternatives.
Last updated
The Playground authentication and authorization package for Laravel applications.
Read more on using Playground Auth at the Read the Docs for Playground.
You can install the package via composer:
composer require gammamatrix/playground-auth
NOTE: This package is required by Playground: Login Blade
artisan aboutPlayground Auth provides information in the artisan about command.
You can publish the config file with:
php artisan vendor:publish --provider="Playground\Auth\ServiceProvider" --tag="playground-config"
See the contents of the published config file: config/playground-auth.php
The default configuration utitlizes:
Playground\Models\User: users.abilitiesPlayground\Models\UserDepending on your needs, there are multiple middleware, authentication and authorization options available.
Abilities may be used with wildcards at multiple levels. Optionally, these abilities may be used with Sanctum for API Tokens.
Here is an example of the configurable abilities:
'abilities' => [
'root' => [
'*',
],
'admin' => [
'app:*',
'playground:*',
'playground-auth:*',
'playground-cms:*',
'playground-cms-resource:*',
'playground-matrix:*',
'playground-matrix-resource:*',
],
'manager' => [
'app:view',
'playground:view',
'playground-auth:logout',
'playground-auth:reset-password',
// ...
'user' => [
'app:view',
// ...
],
// No abilities for guests:
'guest' => [
'none',
],
// Allow abilities for guests:
'guest' => [
'app:view',
'playground:view',
'playground-auth:logout',
'playground-auth:reset-password',
// ...
Read more about environment variables in the config/playground-auth.php on Read the Docs: Playground.
Playground tests many different User model types to support any ecosystem.
Make sure your app is configured for the proper user model in the Laravel configuration:
'providers' => [
'users' => [
'driver' => 'eloquent',
'model' => env('AUTH__MODEL', App\Models\User::class),
],
During testing, Playground tests user various models.
config(['auth.providers.users.model' => 'Playground\\Models\\User'])
This package adds a command to hash a password from the command line:
artisan auth:hash-password 'some password'
artisan auth:hash-password 'some password' --json --pretty
{
"hashed": "$2y$10$langzXKRw1GgO6VgF0IrSecqxi3gAsU5NgmmERT\/2pQXg06mSbEjS"
}
composer cloc
Tests at level 9 on:
config/database/lang/resources/views/src/tests/Feature/tests/Unit/composer analyse
composer format
composer test
Please see CHANGELOG for more information on what has changed recently.
The MIT License (MIT). Please see License File for more information.