{"id":18709443,"url":"https://github.com/joemiller/prefixed-api-key","last_synced_at":"2025-11-09T11:30:29.683Z","repository":{"id":37411207,"uuid":"491332316","full_name":"joemiller/prefixed-api-key","owner":"joemiller","description":"Go implementation of seamapi/prefixed-api-key","archived":false,"fork":false,"pushed_at":"2024-04-03T23:44:52.000Z","size":16,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-15T08:56:05.365Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joemiller.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}},"created_at":"2022-05-12T02:04:38.000Z","updated_at":"2022-06-21T08:49:48.000Z","dependencies_parsed_at":"2024-04-02T00:26:10.492Z","dependency_job_id":"07d41ba9-2342-452f-bd1e-fc61fb2d5902","html_url":"https://github.com/joemiller/prefixed-api-key","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joemiller%2Fprefixed-api-key","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joemiller%2Fprefixed-api-key/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joemiller%2Fprefixed-api-key/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joemiller%2Fprefixed-api-key/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joemiller","download_url":"https://codeload.github.com/joemiller/prefixed-api-key/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239571820,"owners_count":19661230,"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":[],"created_at":"2024-11-07T12:27:35.403Z","updated_at":"2025-11-09T11:30:29.626Z","avatar_url":"https://github.com/joemiller.png","language":"Go","readme":"# prefixed-api-key\n\n[![Go Doc](https://pkg.go.dev/badge/github.com/joemiller/prefixed-api-key.svg)](https://pkg.go.dev/github.com/joemiller/prefixed-api-key)\n![go report card](https://goreportcard.com/badge/github.com/joemiller/prefixed-api-key)\n![github actions status](https://github.com/joemiller/prefixed-api-key/actions/workflows/main.yaml/badge.svg)\n\nGo implementation of [seamapi/prefixed-api-key](https://github.com/seamapi/prefixed-api-key).\n\n## Usage\n\n```\ngo get github.com/joemiller/prefixed-api-key\n```\n\n```go\npackage main\n\nimport (\n\t\"log\"\n\n\tapikey \"github.com/joemiller/prefixed-api-key\"\n)\n\nfunc main() {\n\tgenerator, err := apikey.NewGenerator(\"mycompany\")\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tkey, err := generator.GenerateAPIKey()\n\tlog.Println(key.Token())\n\n\tok, err := apikey.CheckAPIKey(key.Token(), key.LongTokenHash())\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tif ok {\n\t\tlog.Println(\"token matches hash\")\n\t}\n\n\tkey, err = apikey.ParseAPIKey(\"mycompany_5TJMbnP3thd_DjzvCr9MQLaKcaMisJuyUntS7Jpk61ZMp\")\n\tlog.Println(key.LongTokenHash())\n}\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoemiller%2Fprefixed-api-key","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoemiller%2Fprefixed-api-key","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoemiller%2Fprefixed-api-key/lists"}