drago-ex/project-auth
Composer 安装命令:
composer require drago-ex/project-auth
包简介
Authentication and user access package for the Drago project.
README 文档
README
Authentication and user access package for the Drago project. This package provides a complete authentication layer including user login, registration, password recovery and access control. It is designed as a modular extension for projects built on top of the Drago ecosystem and Nette Framework.
Requirements
- PHP >= 8.3
- Nette Framework
- Composer
- Bootstrap
- Naja
- Node.js
- Drago Project core packages
Installation
composer require drago-ex/project-auth
npm Installation
The authentication UI requires the theme switcher and Font Awesome icons:
npm install theme-switcher-compostrap @fortawesome/fontawesome-free
Project files
File copying is handled automatically by drago-ex/project-tools,
which must be installed in your project. Without it, copy the files manually according to the copy section
in this package's composer.json. To skip this package, set "skip": true under
extra.drago-tools.packages.<package-name> in your root composer.json.
Features
- User authentication (sign in / sign out)
- User registration (sign up)
- Password recovery and reset
- User identity handling
- Integration with Nette Security and DI
- Ready-to-use authentication UI components
Adds a new user to the database
Hashes the password, generates a token, and ensures the email is unique.
php vendor/bin/create-user <username> <email> <password>
Secure access to the section
use App\Presentation\Accessory\RequireLogged; use Nette\Application\UI\Presenter; final class SecurePresenter extends Presenter { use RequireLogged; }
Generate permission provider
If you use project ACL (drago-ex/permission), you can generate a module permission class:
php vendor/bin/create-auth-permission
Database migration
php vendor/bin/migration db:migrate vendor/drago-ex/project-auth/migrations
Automated setup
This package exposes setup commands in composer.json under extra.drago-tools.commands.
If drago-ex/project-tools is installed, you can run them from the project root:
php vendor/bin/drago-setup
drago-ex/project-auth 适用场景与选型建议
drago-ex/project-auth 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 231 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 12 月 27 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 drago-ex/project-auth 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 drago-ex/project-auth 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 231
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 10
- 依赖项目数: 5
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-12-27