{"id":16464585,"url":"https://github.com/deatil/lake-admin-addon-lapi","last_synced_at":"2026-03-01T23:03:49.981Z","repository":{"id":57010759,"uuid":"287581107","full_name":"deatil/lake-admin-addon-lapi","owner":"deatil","description":"强大的API接口管理系统，支持多种签名算法验证，支持签名字段多个位置存放","archived":false,"fork":false,"pushed_at":"2021-02-04T16:11:23.000Z","size":150,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-08T08:04:47.975Z","etag":null,"topics":["api","api-client","lake","lake-admin","lapi","phpapi","thinkphp","thinkphp6"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deatil.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-14T16:49:22.000Z","updated_at":"2021-02-04T16:09:37.000Z","dependencies_parsed_at":"2022-08-21T13:40:45.729Z","dependency_job_id":null,"html_url":"https://github.com/deatil/lake-admin-addon-lapi","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/deatil/lake-admin-addon-lapi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deatil%2Flake-admin-addon-lapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deatil%2Flake-admin-addon-lapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deatil%2Flake-admin-addon-lapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deatil%2Flake-admin-addon-lapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deatil","download_url":"https://codeload.github.com/deatil/lake-admin-addon-lapi/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deatil%2Flake-admin-addon-lapi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29987656,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T22:42:38.399Z","status":"ssl_error","status_checked_at":"2026-03-01T22:41:51.863Z","response_time":124,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","api-client","lake","lake-admin","lapi","phpapi","thinkphp","thinkphp6"],"created_at":"2024-10-11T11:28:44.009Z","updated_at":"2026-03-01T23:03:49.965Z","avatar_url":"https://github.com/deatil.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"## api管理系统\n\n\n### 项目介绍\n\n*  基于 `lake-admin` 后台管理框架的api管理系统模块插件\n\n\n### 签名算法\n\n*  第一步，设所有发送或者接收到的数据为集合M，将集合M内非空参数值的参数按照参数名ASCII码从小到大排序（字典序），使用URL键值对的格式（即key1=value1\u0026key2=value2…）拼接成字符串stringA。 \n*  第二步，在stringA最后拼接上key（即key=keyValue）得到stringSignTemp字符串，并对stringSignTemp进行MD5运算，再将得到的字符串所有字符转换为大写，得到sign值signValue。\n*  特别注意以下重要规则： \n~~~\n◆ 参数名ASCII码从小到大排序（字典序）；\n◆ 如果参数的值为空不参与签名；\n◆ 参数名区分大小写；\n◆ 验证调用返回或服务器主动通知签名时，传送的sign参数不参与签名，将生成的签名与该sign值作校验；\n◆ 接口可能增加字段，验证签名时必须支持增加的扩展字段 \n~~~\n\n\n### 使用方法 \n\n*  composer安装\n    * `composer require lake/lake-admin-addon-lapi`\n*  本地安装\n    * 后台 `本地模块-\u003e模块管理-\u003e本地安装` 上传模块或者手动将模块上传到 `/addon` 目录\n    * 手动放置模块或者上传模块请确保目录为 `lapi/Service.php`\n*  最后在 `本地模块-\u003e模块管理-\u003e全部` 安装添加的模块\n*  请求示例：/api/Index/index?name=name2\u0026app_id=API2020090322513090789\u0026nonce_str=6V0RVgWV9uCJXncv\u0026timestamp=1599145016\u0026sign=E3728BEEE2A5753CAD2556EA00C92A86\n\n\n### 模块内 `api` 文件方法设置\n\n*  方法设置\n~~~\n\u003c?php\n\nnamespace app\\api\\controller;\n\n/**\n * @title 接口标题[必需]\n * @description 接口描述\n */\nclass Index\n{\n    /**\n     * 接口方法\n     *\n     * @title 接口方法标题[必需]\n     * @method GET[必需]\n     * @request {\"a\":\"c\"}\n     * @response {\"d\":\"e\"}\n     * @description 接口方法描述\n     * @listorder 100\n     * @status 1\n     */\n    public function index()\n    {\n        return json([\n            'code' =\u003e 0,\n            'msg' =\u003e 'hello world!',\n            'data' =\u003e 'api data',\n        ]);\n    }\n}\n\n~~~\n\n\n### 模块内使用 \n\n*  `trait` 引用\n~~~\nuse app\\BaseController;\nuse app\\lapi\\traits\\Lapi as LapiTrait;\n\nclass Index extends BaseController\n{\n    use LapiTrait;\n\n    // 初始化\n    protected function initialize()\n    {\n        parent::initialize();\n        $this-\u003echeckApi();\n    }\n}\n~~~\n\n*  `继承` 使用\n~~~\nuse app\\lapi\\boot\\Lapi as LapiBase;\n\nclass Index extends LapiBase\n{\n    // 初始化\n    protected function initialize()\n    {\n        parent::initialize();\n        \n        $this-\u003echeckApi();\n    }\n}\n~~~\n\n*  `控制器中间件` 使用\n~~~\nuse app\\BaseController;\nuse app\\lapi\\middleware\\Lapi as LapiMiddleware;\n\nclass Index extends BaseController\n{\n    /**\n     * 控制器中间件\n     * @var array\n     */\n    protected $middleware = [\n        LapiMiddleware::class,\n    ];\n    \n    // 初始化\n    protected function initialize()\n    {\n        parent::initialize();\n    }\n}\n~~~\n\n\n### 模块推荐\n\n| 名称 | 描述 |\n| --- | --- |\n| [cms系统](https://github.com/deatil/lake-admin-cms) | 简单高效实用的内容管理系统 |\n| [用户管理](https://github.com/deatil/lake-admin-addon-luser) | 通用的用户管理模块，实现了用户登陆api的token及jwt双认证 |\n| [API接口](https://github.com/deatil/lake-admin-addon-lapi) | 强大的API接口管理系统，支持多种签名算法验证，支持签名字段多个位置存放 |\n| [路由美化](https://github.com/deatil/lake-admin-addon-lroute) | 支持thinkphp自带的多种路由美化设置，自定义你的系统url |\n| [菜单结构](https://github.com/deatil/lake-admin-addon-lmenu) | 提取后台菜单分级结构格式，为你的模块开发保驾护航 |\n| [数据库管理](https://github.com/deatil/lake-admin-addon-database) | 数据库备份、优化、修复及还原，你的系统维护帮手 |\n| [广告模块](https://github.com/deatil/lake-admin-ad) | cms模块必备 |\n| [自定义表单](https://github.com/deatil/lake-admin-form) | cms模块必备模块 |\n| [友情链接](https://github.com/deatil/lake-admin-friendlink) | cms模块必备模块 |\n\n\n## 版权信息\n\n本模块遵循Apache2开源协议发布，并提供免费使用。\n\n本项目包含的第三方源码和二进制文件之版权信息另行标注。\n\n版权所有 Copyright © deatil(https://github.com/deatil)\n\nAll rights reserved。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeatil%2Flake-admin-addon-lapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeatil%2Flake-admin-addon-lapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeatil%2Flake-admin-addon-lapi/lists"}