undertaker/fla-loader
Composer 安装命令:
composer require undertaker/fla-loader
包简介
Flarum extension for external loader integration with time-limited roles and file management
README 文档
README
A Flarum extension for external loader integration with time-limited roles and file management.
Features
- External Login API: Authenticate users via external loaders using username/password and receive session tokens
- HWID Protection: Hardware ID validation to prevent account sharing (automatically registered on first login)
- Time-Limited Role Assignment: Admins can assign roles with expiration times (7 days, 30 days, 180 days, 1 year, or lifetime)
- File Management System:
- Upload files with role-based access control
- Download navbar entry for user-accessible files
- API endpoint for external loader downloads with session token authentication
- Admin interface for managing files and permissions
- HWID Management: Admins can reset user HWIDs to allow login from new devices
Installation
-
Install via composer:
composer require undertaker/fla-loader
-
Enable the extension in your Flarum admin panel
-
Run migrations:
php flarum migrate
API Endpoints
Login
- POST
/api/fla-loader/login- Body:
{"username": "...", "password": "...", "hwid": "..."} - Returns: Session token and user groups/roles
- Note: HWID is required and validated
- Body:
File Download
- GET
/api/fla-loader/download/{id}?token=...- Query params:
token(session token) - Returns: File download
- Query params:
File Management (Admin only)
- GET
/api/fla-loader/files- List all files - POST
/api/fla-loader/files- Upload file - PATCH
/api/fla-loader/files/{id}- Update file permissions - DELETE
/api/fla-loader/files/{id}- Delete file
Role Assignment (Admin only)
- POST
/api/fla-loader/roles- Assign time-limited role- Body:
{"userId": 1, "groupId": 2, "duration": "30d"}
- Body:
- GET
/api/fla-loader/roles/{userId}- Get user's role assignments
HWID Management (Admin only)
- POST
/api/fla-loader/hwid/reset- Reset a user's HWID- Body:
{"userId": 1}
- Body:
- GET
/api/fla-loader/hwid/{userId}- Check user's HWID status
Console Commands
php flarum fla-loader:expire-roles- Manually expire roles (should be run via cron)php flarum fla-loader:cleanup-sessions- Clean up expired session tokens
Development
If you want to modify the extension's JavaScript code:
- Clone the repository
- Install dependencies:
npm install
- Make your changes to files in
js/src/ - Build the assets:
npm run build
Or use development mode with auto-rebuild:npm run dev
License
MIT
undertaker/fla-loader 适用场景与选型建议
undertaker/fla-loader 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 9 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 01 月 16 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 undertaker/fla-loader 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 undertaker/fla-loader 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 9
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 13
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-01-16