{"id":17349204,"url":"https://github.com/co2-git/web-rockets-cookie","last_synced_at":"2025-10-10T14:04:46.253Z","repository":{"id":68259711,"uuid":"51347550","full_name":"co2-git/web-rockets-cookie","owner":"co2-git","description":"Use HTTP(s) cookies to identify your socket.io clients.","archived":false,"fork":false,"pushed_at":"2016-03-27T02:58:35.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T11:44:44.930Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/co2-git.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":"2016-02-09T04:57:52.000Z","updated_at":"2016-02-09T04:58:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"3bec1c98-9105-4112-8ea9-d8ca2918c139","html_url":"https://github.com/co2-git/web-rockets-cookie","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/co2-git/web-rockets-cookie","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/co2-git%2Fweb-rockets-cookie","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/co2-git%2Fweb-rockets-cookie/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/co2-git%2Fweb-rockets-cookie/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/co2-git%2Fweb-rockets-cookie/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/co2-git","download_url":"https://codeload.github.com/co2-git/web-rockets-cookie/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/co2-git%2Fweb-rockets-cookie/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279004184,"owners_count":26083688,"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","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-10-15T16:55:02.181Z","updated_at":"2025-10-10T14:04:46.235Z","avatar_url":"https://github.com/co2-git.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"web-rockets-cookie\n===\n\nUse HTTP(s) cookies to identify your socket.io clients.\n\n# Install\n\n```bash\nnpm install -s web-rockets-cookie\n```\n\n# Usage\n\n```js\nidentifyByCookie(String cookieName, Boolean secureCookie, Function next);\n```\n\n## With SocketIO\n\n```js\nimport SocketIO from 'socket.io';\nimport identifyByCookie from 'web-rockets-cookie';\n\nconst server = /* create a HTTP server */\n\nconst io = SocketIO.listen(server); /* create Web Sockets server */\n\nio.use(identifyByCookie(\n  cookieName, // the name of the cookie we want to get value from\n  true, // if true, cookie is a secure cookie\n  (cookie, socket, next) =\u003e { // the callback function\n  // cookie is the cookie value of cookie name\n  // socket is the current socket\n  // next goes to next middleware\n}));\n```\n\n## With Web-Rockets\n\n```js\nimport WebRockets from 'web-rockets';\nimport identifyByCookie from 'web-rockets-cookie';\n\nnew WebRockets()\n  .use(identifyByCookie(cookieName, true, (cookie, socket, next) =\u003e {}));\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fco2-git%2Fweb-rockets-cookie","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fco2-git%2Fweb-rockets-cookie","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fco2-git%2Fweb-rockets-cookie/lists"}