italofantone/api-token-validator
最新稳定版本:v1.0.1
Composer 安装命令:
composer require italofantone/api-token-validator
包简介
A simple package to validate API tokens with Laravel. Middleware to protect routes using valid tokens.
关键字:
README 文档
README
A simple package to validate API tokens with Laravel. Middleware to protect routes using valid tokens.
⚠️ This code was used for educational purposes [...]
Installation
You can install the package via composer. Run the following command:
composer require italofantone/api-token-validator
Usage
File .env: API_TOKEN_VALIDATOR=secret.
<?php
use Illuminate\Support\Facades\Route;
use Italofantone\ApiTokenValidator\Http\Middleware\EnsureApiTokenIsValid;
Route::get('protected-route', function () {
return response()->json([
'message' => 'You are authorized to access this route!',
]);
})
->middleware(EnsureApiTokenIsValid::class)
->name('protected-route');
Contact
- Email: i@rimorsoft.com
- Twitter: @italofantone
- LinkedIn: italofantone
Donations
If you find this project useful and would like to support its development, you can make a donation via PayPal:
- PayPal: Donate via PayPal
Thank you for your support!
统计信息
- 总下载量: 100
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-12-02