agrodep/one-id
Composer 安装命令:
composer require agrodep/one-id
包简介
OneId OAuth package for Laravel/PHP
README 文档
README
Yagona identifikatsiya tizimi (Single identification system)
Talablar (Requirements)
- PHP ^8.0
- Laravel ^10
1. O‘rnatish (Installation)
Install the package via composer:
composer require agrodep/one-id
Sozlama faylni asosiyga chiqarish
php artisan vendor:publish --provider="Agrodep\OneId\OneIdServiceProvider"
2. Sozlash (Setup)
- Muhit o‘zgaruvchilari o‘rnatilinadi (Set environment variables)
ONE_ID_SSO_URL=<one_id_sso_url> ONE_ID_CLIENT_ID=<client_id> ONE_ID_CLIENT_SECRET=<client_secret>
- Sozlama fayli yaratilinadi (Set Config file)
/* |-------------------------------------------------------------------------- | OneId Integration |-------------------------------------------------------------------------- | This is the OneId package | */ 'one_id_sso_url' => env('ONE_ID_SSO_URL'), 'one_id_client_id' => env('ONE_ID_CLIENT_ID'), 'one_id_client_secret' => env('ONE_ID_CLIENT_SECRET'), 'one_id_client_scope' => env('ONE_ID_CLIENT_SCOPE'),
3. Qo‘shimcha sozlamalar (Extra configurations)
ONE_ID_CLIENT_SCOPE=test ONE_ID_CLIENT_STATE=test
3.1 Web - for monolith website and systems
php artisan one-id:web-make- Define following route in web.php
# OneId Route::get('/one-id/access', [OneIdWebAuthController::class, 'access']);
3.2 Api - for REST api website and systems
php artisan one-id:api-make- Define following route in api.php
# OneId Route::post('/auth/token', [OneIdAuthController::class, 'token']);
4. Ishlatish (Usage)
Modulni ham API ham odatiy WEB uslubda ishlatish mumkin
- Api
- [POST/GET] /api/one-id/url (name: one-id.url) - OneIdga o‘tish uchun havola beradi
- [POST] /api/auth/token - OneId bergan kod (code) bilan token olish. (Ushbu manzil ixtiyoriy tartibda o‘zgartirilishi mumkin, 3.2 dagi manzil bilan bir xil qo‘yiladi)
- Web
- [GET] /one-id/login (name: one-id.login) - OneId SSO sahifasiga o‘tadi
- [GET] /one-id/access - OneId orqali kod (code) bilan kirib kelganda tizimga kiritish. (Ushbu manzil ixtiyoriy tartibda o‘zgartirilishi mumkin, 3.1 dagi manzil bilan bir xil qo‘yiladi)
Foydalanilgan manbalar (References)
- Testbench - Laravel Testing Helper for Packages Development
- Laravel package tools - Tools for creating Laravel packages
Havolalar (Links)
agrodep/one-id 适用场景与选型建议
agrodep/one-id 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 18 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 10 月 23 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 agrodep/one-id 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 agrodep/one-id 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 18
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 14
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-10-23