{"id":16464584,"url":"https://github.com/deatil/larke-jwt-sm2","last_synced_at":"2025-08-13T22:21:23.296Z","repository":{"id":203023279,"uuid":"708635891","full_name":"deatil/larke-jwt-sm2","owner":"deatil","description":"larke-jwt 库的 SM2 和 SM3 驱动","archived":false,"fork":false,"pushed_at":"2023-10-28T10:51:20.000Z","size":138,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-10T10:29:23.398Z","etag":null,"topics":["jwt","jwt-sm2","jwt-sm3","larke-admin"],"latest_commit_sha":null,"homepage":"https://github.com/deatil/larke-jwt-sm2","language":"PHP","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,"governance":null}},"created_at":"2023-10-23T04:19:59.000Z","updated_at":"2024-01-17T08:03:10.000Z","dependencies_parsed_at":"2023-10-27T16:31:58.812Z","dependency_job_id":null,"html_url":"https://github.com/deatil/larke-jwt-sm2","commit_stats":null,"previous_names":["deatil/larke-jwt-sm2"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deatil%2Flarke-jwt-sm2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deatil%2Flarke-jwt-sm2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deatil%2Flarke-jwt-sm2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deatil%2Flarke-jwt-sm2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deatil","download_url":"https://codeload.github.com/deatil/larke-jwt-sm2/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241014046,"owners_count":19894185,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["jwt","jwt-sm2","jwt-sm3","larke-admin"],"created_at":"2024-10-11T11:28:43.913Z","updated_at":"2025-02-27T12:37:50.819Z","avatar_url":"https://github.com/deatil.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JWT SM2 驱动\n\nlarke-jwt 库的 SM2 和 SM3 驱动\n\n\n## 项目介绍\n\n*  基于 `lpilp/guomi` 的 `larke-jwt` 的 SM2 驱动，同时适配 larke-admin 后台管理系统\n*  使用 `SM2` 和 `SM3` 作为 JWT 的验证驱动\n*  JWT 配置标识为 `GmSM2` 和 `GmSM3`\n*  使用 `SM3` 需要 `openssl` 支持 `SM3` 版本\n\n\n## 环境要求\n\n - PHP \u003e= 8.1\n\n\n## 安装步骤\n\n1. 下载安装\n\n```php\ncomposer require lake/larke-jwt-sm2\n```\n\n2. 更改配置文件\n\n```php\nlarkeadmin.jwt.signer.algorithm = 'GmSM2'\nlarkeadmin.jwt.signer.private_key = 'sm2/path/prikey.pem'\nlarkeadmin.jwt.signer.public_key = 'sm2/path/pubkey.pem'\n```\n和\n```php\nlarkeadmin.jwt.signer.algorithm = 'GmSM3'\nlarkeadmin.jwt.signer.secrect = base64_encode(\"123123\")\n```\n\nSM2 字符时使用 HEX 编码的明文私钥和公钥。\n使用文件时可使用 PKCS1 和 PKCS8 编码的 PEM 格式的 SM2 私钥，公钥默认只有一种类型。\n密钥可查看 `docs/key` 文件夹 \n\n\n## 开源协议\n\n*  本库遵循 `Apache2` 开源协议发布，在保留本系统版权的情况下提供个人及商业免费使用。 \n\n\n## 版权\n\n*  该系统所属版权归 deatil(https://github.com/deatil) 所有。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeatil%2Flarke-jwt-sm2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeatil%2Flarke-jwt-sm2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeatil%2Flarke-jwt-sm2/lists"}