{"id":16464497,"url":"https://github.com/deatil/lakego-jwt","last_synced_at":"2026-02-22T20:05:14.767Z","repository":{"id":57704149,"uuid":"479625584","full_name":"deatil/lakego-jwt","owner":"deatil","description":"基于 go-jwt 的 JWT 库","archived":false,"fork":false,"pushed_at":"2025-02-25T15:34:36.000Z","size":49,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-13T08:48:41.724Z","etag":null,"topics":["go","go-jwt","golang","jwt","jwt-authentication","lakego-jwt"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/deatil/lakego-jwt","language":"Go","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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-04-09T05:16:01.000Z","updated_at":"2025-02-25T15:33:11.000Z","dependencies_parsed_at":"2025-02-25T12:26:17.501Z","dependency_job_id":"7f29dbdd-a2f9-4c58-8482-58b61f070ee0","html_url":"https://github.com/deatil/lakego-jwt","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/deatil/lakego-jwt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deatil%2Flakego-jwt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deatil%2Flakego-jwt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deatil%2Flakego-jwt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deatil%2Flakego-jwt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deatil","download_url":"https://codeload.github.com/deatil/lakego-jwt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deatil%2Flakego-jwt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29725300,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-22T19:57:12.410Z","status":"ssl_error","status_checked_at":"2026-02-22T19:54:50.710Z","response_time":110,"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":["go","go-jwt","golang","jwt","jwt-authentication","lakego-jwt"],"created_at":"2024-10-11T11:28:13.566Z","updated_at":"2026-02-22T20:05:14.751Z","avatar_url":"https://github.com/deatil.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## JWT\n\n\n### 项目介绍\n\n*  JWT 生成和验证\n\n\n### 下载安装\n\n~~~go\ngo get -u github.com/deatil/lakego-jwt\n~~~\n\n\n### 使用\n\n~~~go\npackage main\n\nimport (\n    \"fmt\"\n    \"github.com/deatil/lakego-jwt/jwt\"\n)\n\nfunc main() {\n    jwter := jwt.New().\n        WithAud(aud).\n        WithIat(nowTime).\n        WithExp(int64(exp)).\n        WithJti(jti).\n        WithIss(iss).\n        WithNbf(int64(nbf)).\n        WithSub(sub).\n        WithSigningMethod(signingMethod).\n        WithSecret(secret).\n        WithPrivateKey(privateKeyData).\n        WithPublicKey(publicKeyData).\n        WithPrivateKeyPassword(privateKeyPassword).\n        WithClaim(k, v)\n\n    token, err := jwter.MakeToken()\n    fmt.Println(\"生成的 Token 为：\", token)\n\n    // 解析 token\n    parsedToken, err := jwter.ParseToken(token)\n\n    // token 过期检测\n    ok, err := jwter.Validate(parsedToken)\n\n    // 验证 token 是否有效\n    ok, err := jwter.Verify(parsedToken)\n}\n\n~~~\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%2Flakego-jwt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeatil%2Flakego-jwt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeatil%2Flakego-jwt/lists"}