deegitalbe / laravel-trustup-io-authentification
Connect your Laravel project to our centralized authentication service
Installs: 3 175
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 1
Open Issues: 0
Requires
- php: ^8.2
- henrotaym/laravel-flare-exception-handler: ^3.0
- illuminate/contracts: ^10.0||^11.0
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- laravel/pint: ^1.14
- nunomaduro/collision: ^8.1.1||^7.10.0
- orchestra/testbench: ^9.0.0||^8.22.0
- pestphp/pest: ^2.34
- phpstan/extension-installer: ^1.3
- phpstan/phpstan-deprecation-rules: ^1.1
- phpstan/phpstan-phpunit: ^1.3
- spatie/laravel-ray: ^1.35
- dev-main
- v3.0
- v2.1.0
- v2.0.2
- v2.0.1
- v2.0
- v1.3.0
- v1.2.0
- v1.1.4
- v1.1.3
- v1.1.2
- v1.1.1
- v1.1.0
- v1.0.0
- 0.0.19
- 0.0.18
- v0.0.18-alpha.3
- v0.0.18-alpha.2
- v0.0.18-alpha.1
- v0.0.18-alpha.0
- 0.0.17
- 0.0.16
- 0.0.15
- 0.0.14
- 0.0.13
- 0.0.12
- 0.0.11
- 0.0.10
- 0.0.9
- 0.0.8
- 0.0.7
- 0.0.6
- 0.0.5
- 0.0.4
- 0.0.3
- 0.0.2
- 0.0.1
- dev-laravel-11
- dev-laravel-10
- dev-pierrewasilewski/tdd-388-modifier-le-package-dauthentification-pour-que-lid-de
- dev-feature/rename_auth_url_varialbe
- dev-docker-integration-compatibility
- dev-feature/laravel-10-compatibility
- dev-hotfix/error-when-cookie-is-invalid
- dev-feature/user-extending-laravel-model
This package is auto-updated.
Last update: 2024-10-30 18:09:23 UTC
README
Connect your Laravel project to our centralized authentication service
Installation
Require package
composer require deegitalbe/laravel-trustup-io-authentification
Publish config
php artisan vendor:publish --tag="trustup-io-authentification-config"
This will publish trustup-io-authentification.php
in config folder
Define roles
You should define roles that have access in config file trustup-io-authentification.php
.
'roles' => [ 'Super Admin', 'Employee', 'Translator' ],
Define guards
In config file auth.php
redefine your guards
'guards' => [ 'web' => [ 'driver' => 'session', 'provider' => 'users', 'driver' => 'trustup.io', ], 'api' =>[ 'driver' => 'trustup.io' ] ],
Activate docker
In case your application is using docker-integration, define this env variable
TRUSTUP_IO_AUTH_DOCKER_ACTIVATED=true
Add middleware to protect your restricted routes
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 ... });
Docker compatibility
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
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.