yabhq / flightdeck
API boilerplate for Laravel
Requires
- php: ^8.2
- illuminate/support: ^11.0
- tymon/jwt-auth: ^2.1
Requires (Dev)
- laravel/legacy-factories: ^1.4
- orchestra/testbench: ^9.4
- phpunit/phpunit: ^11.0
- dev-master
- v0.13.0
- v0.12.0
- v0.11.0
- v0.10.1
- v0.10.0
- v0.9.0
- v0.8.0
- v0.7.0
- v0.6.0
- v0.5.0
- v0.4.0
- v0.3.0
- v0.2.1
- v0.2
- dev-dependabot/composer/league/commonmark-2.6.0
- dev-dependabot/composer/laravel/framework-11.31.0
- dev-dependabot/composer/symfony/process-7.1.7
- dev-dependabot/composer/symfony/http-foundation-7.1.7
This package is auto-updated.
Last update: 2024-12-10 01:11:40 UTC
README
Installation
You can install the package via composer:
composer require yabhq/flightdeck
Usage
Generate new API key for authorization
php artisan flightdeck:generate app1
List all available API keys
php artisan flightdeck:list
Multi-Auth
FlightDeck makes authenticating users with multiple guards a breeze.
Suppose you wish to add support for login, logout and token refreshing for a hypothetical "customer" user type.
Simply extend the FlightDeck AuthController
class as follows:
<?php namespace App\Http\Controllers\Customer; use Yab\FlightDeck\Http\Controllers\AuthController as FlightAuthController; class AuthController extends FlightAuthController { /** * Get the guard to be used for login, logout and token refreshes. * * @return \Illuminate\Contracts\Auth\StatefulGuard */ protected function guard() { return auth()->guard('customer'); } }
You can also extend FlightDeckForgotPasswordController
and FlightDeckResetPasswordController
in a similar way.
Testing
composer test
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email us instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.