alimwa / api-auth
A simple package that exposes endpoints for Token Based API authentication.
Requires
- php: ^8.0
- illuminate/support: ^9.37
- laravel/sanctum: ^3.0
Requires (Dev)
- nunomaduro/larastan: ^2.0
- nunomaduro/phpinsights: ^2.7
- orchestra/testbench: ^7.0
- phpunit/phpunit: ^9.0
README
Thanks to Taylor the majority of use who handle API based authentication and authorisation now have it easy and through the sanctum package. However, the package only allows for the management of access tokens and the permissions on them which is why after implementing authentication endpoints based of off sanctum I have decided like any other dev to create my own package that I aim to use throughout all my APIs.
I am to start by supporting the latest version of Laravel and then creating other version to add support for more. I will be following the PSR12 standard for those who wish to contribute and help maintain this package.
Installation
You can install the package via composer:
composer require alimwa/api-auth
Configuration
Once the package is installed you may run the following command to publish Sanctum bases resources.
php artisan vendor:publish --provider="Laravel\Sanctum\SanctumServiceProvider"
Then migrate the database if it hasn't been already.
php artisan migrate
Usage
Once the package is installed you may run the following command view your new routes that you can access from SPAs and Mobile Apps.
php artisan route:list
Migrate
Testing
composer test
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
SecurityApp
If you discover any security related issues, please email lensig13@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
Laravel Package Boilerplate
This package was generated using the Laravel Package Boilerplate.