composer require deegitalbe/laravel-trustup-io-authentification
php artisan vendor:publish --tag="trustup-io-authentification-config"
This will publish trustup-io-authentification.php
in config folder
You should define roles that have access in config file trustup-io-authentification.php
.
'roles' => [
'Super Admin',
'Employee',
'Translator'
],
In config file auth.php
redefine your guards
'guards' => [
'web' => [
'driver' => 'session',
'provider' => 'users',
'driver' => 'trustup.io',
],
'api' =>[
'driver' => 'trustup.io'
]
],
In case your application is using docker-integration, define this env variable
TRUSTUP_IO_AUTH_DOCKER_ACTIVATED=true
use Illuminate\Support\Facades\Route;
use Deegitalbe\LaravelTrustupIoAuthentification\Http\Middleware\TrustUpIoAuthMiddleware;
Route::middleware(TrustUpIoAuthMiddleware::class)->group(function() {
// Your restricted routes ...
});
Route::middleware(TrustUpIoAuthMiddleware::class.':Super Admin|Translator')->group(function() {
// Your restricted routes only accessible by super admins or translators ...
});
Update package to latest version
composer require deegitalbe/laravel-trustup-io-authentification
Force config publication and set correct values (model, roles, guard, ...)
php artisan vendor:publish --tag="trustup-io-authentification-config" --force
Define env variable
TRUSTUP_IO_AUTH_DOCKER_ACTIVATED=true
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.