{"id":42473253,"url":"https://github.com/tsawler/signer","last_synced_at":"2026-01-28T10:10:47.222Z","repository":{"id":57696993,"uuid":"494029834","full_name":"tsawler/signer","owner":"tsawler","description":"A simple package to sign and verify URLs","archived":false,"fork":false,"pushed_at":"2024-06-26T13:32:09.000Z","size":36,"stargazers_count":13,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-06-26T16:34:45.428Z","etag":null,"topics":["go","golang","security"],"latest_commit_sha":null,"homepage":"","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/tsawler.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.md","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-19T10:46:28.000Z","updated_at":"2024-06-26T13:32:11.000Z","dependencies_parsed_at":"2024-06-11T13:35:25.330Z","dependency_job_id":"49a12dc4-3711-4809-a5cf-0632a31ab517","html_url":"https://github.com/tsawler/signer","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/tsawler/signer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsawler%2Fsigner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsawler%2Fsigner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsawler%2Fsigner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsawler%2Fsigner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tsawler","download_url":"https://codeload.github.com/tsawler/signer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsawler%2Fsigner/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28844011,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T07:39:25.367Z","status":"ssl_error","status_checked_at":"2026-01-28T07:39:24.487Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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","golang","security"],"created_at":"2026-01-28T10:10:44.025Z","updated_at":"2026-01-28T10:10:47.200Z","avatar_url":"https://github.com/tsawler.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Go Report Card](https://goreportcard.com/badge/github.com/tsawler/signer)](https://goreportcard.com/report/github.com/tsawler/signer)\n[![Version](https://img.shields.io/badge/goversion-1.18.x-blue.svg)](https://golang.org)\n\u003ca href=\"https://golang.org\"\u003e\u003cimg src=\"https://img.shields.io/badge/powered_by-Go-3362c2.svg?style=flat-square\" alt=\"Built with GoLang\"\u003e\u003c/a\u003e\n[![License](http://img.shields.io/badge/license-mit-blue.svg?style=flat-square)](https://raw.githubusercontent.com/tsawler/goblender/master/LICENSE)\n![Tests](https://github.com/tsawler/signer/actions/workflows/tests.yml/badge.svg)\n[![Go Coverage](https://github.com/tsawler/signer/wiki/coverage.svg)](https://raw.githack.com/wiki/tsawler/signer/coverage.html)\n# Signer\n\nSigner is a simple package that makes signing URLs painless. It uses\n[github.com/tsawler/itsdangerous](https://github.com/tsawler/itsdangerous) to sign URLs.\n\nThis is useful for things like sending an email with a link that can be verified, and which is\ntamper-proof.\n\n## Installation\n\n`go get github.com/tsawler/signer@latest`\n\n## Usage\n\n```golang\n\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/tsawler/signer\"\n)\n\nconst secret = \"somelongsecuresecret\"\n\nfunc main() {\n\t// Create a variable of type Signature, and pass it a secret, \u003c= 64 characters.\n\tsign := signer.Signature{Secret: secret}\n\n\t// Call the SignURL to get a signed version. Note that only the part after \n\t// https://somesite.com or http://somesite.com is actually signed, but you \n\t// must pass the full url. This way, we can use the package in development \n\t// without worrying about the domain name of a particular site.\n\tsigned, _ := sign.SignURL(\"https://example.com/test?id=1\")\n\tfmt.Println(\"Signed url:\", signed)\n\t\n\t// Output is something like:\n\t// https://example.com/test?id=1\u0026hash=.3w4TgJ.pAJWBPAO5k1cimZJ-nrRKnlvosOY1Krrp3ALf1rOAds\n\t\n\t// Verify that a signed URL is valid, and was  issued by this application. Here, \n\t// valid is true if the URL has a valid signature, and false if it is not.\n\tvalid, _ := sign.VerifyURL(signed)\n\tfmt.Println(\"Valid url:\", valid)\n\n\t// You can also check for expiry. Here, the signed url expires after 30 minutes.\n\texpired := sign.Expired(signed, 30)\n\tfmt.Println(\"Expired:\", expired)\n\n\t// You can also check for expiry in seconds. Here, the signed url expires after 30 seconds.\n\texpired = sign.ExpiredSeconds(signed, 30)\n\tfmt.Println(\"Expired:\", expired)\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsawler%2Fsigner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftsawler%2Fsigner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsawler%2Fsigner/lists"}