{"id":23246460,"url":"https://github.com/openware/rails5session-go","last_synced_at":"2025-07-19T02:32:34.753Z","repository":{"id":90546052,"uuid":"151255052","full_name":"openware/rails5session-go","owner":"openware","description":"Go decrypter of Rails 5 sessions.","archived":false,"fork":false,"pushed_at":"2018-10-02T13:05:01.000Z","size":4,"stargazers_count":3,"open_issues_count":0,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-18T14:53:53.137Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2018-10-02T13:00:06.000Z","updated_at":"2025-02-17T04:19:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"21b31266-2ec5-4123-9847-eed6972bf21e","html_url":"https://github.com/openware/rails5session-go","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/openware/rails5session-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openware%2Frails5session-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openware%2Frails5session-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openware%2Frails5session-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openware%2Frails5session-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openware","download_url":"https://codeload.github.com/openware/rails5session-go/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openware%2Frails5session-go/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265876912,"owners_count":23842956,"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-12-19T07:15:09.559Z","updated_at":"2025-07-19T02:32:34.728Z","avatar_url":"https://github.com/openware.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rails5session-go\n\n[![GoDoc](https://godoc.org/github.com/openware/rails5session-go?status.svg)](https://godoc.org/github.com/openware/rails5session-go)\n\nGo decrypter of Rails 5 sessions.\n\n## Installation\n\n```\ngo get github.com/openware/rails5session-go\n```\n\n## Usage\n\nCreate Encryption instance with your rails session secret key base (specified\nin config/secrets.yml)\n\n```go\nencryption := rails5session.NewEncryption(\n    secretKeyBase,\n    cookieSalt,\n    signedCookieSalt,\n)\n```\n\n* You can obtain your cookieSalt by running following ruby code:\n\n    ```ruby\n    Rails.application.encryption.action_dispatch.encrypted_cookie_salt\n    ```\n\n* You can obtain your signedCookieSalt by running following ruby code:\n\n    ```ruby\n    Rails.application.encryption.action_dispatch.encrypted_signed_cookie_salt\n    ```\n\n\nThen verify and decrypt user's cookie, it will return decrypted slice of bytes\nand error if any.\n\n```go\ndata, err := rails5session.VerifyAndDecryptCookieSession(encryption, cookie)\nif err != nil {\n    panic(err)\n}\n```\n\nAlso, take a look at [tests](decrypt_test.go).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenware%2Frails5session-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenware%2Frails5session-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenware%2Frails5session-go/lists"}