Skip to content

yabhq/flightdeck

Repository files navigation

FlightDeck - Level up your Laravel API

Latest Version on Packagist CircleCI Quality Score Total Downloads

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.