{"id":21814322,"url":"https://github.com/snawoot/php-storageless-sessions","last_synced_at":"2025-04-13T23:46:19.623Z","repository":{"id":57054254,"uuid":"86688355","full_name":"Snawoot/php-storageless-sessions","owner":"Snawoot","description":"Sessions handler which stores session data in HMAC-signed and encrypted cookies","archived":false,"fork":false,"pushed_at":"2020-08-09T21:57:11.000Z","size":36,"stargazers_count":30,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-27T13:51:22.733Z","etag":null,"topics":["encrypted-cookies","encryption","hmac","hmac-signature","jwt","jwt-authentication","jwt-middleware","jwt-token","php","php-security","php-sessions","php-storageless-sessions","session-handler","sessions","sessionservice","sessionstorage","sessionstore"],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/Snawoot.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}},"created_at":"2017-03-30T10:07:10.000Z","updated_at":"2024-11-24T19:21:51.000Z","dependencies_parsed_at":"2022-08-24T14:00:11.093Z","dependency_job_id":null,"html_url":"https://github.com/Snawoot/php-storageless-sessions","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Snawoot%2Fphp-storageless-sessions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Snawoot%2Fphp-storageless-sessions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Snawoot%2Fphp-storageless-sessions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Snawoot%2Fphp-storageless-sessions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Snawoot","download_url":"https://codeload.github.com/Snawoot/php-storageless-sessions/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248799695,"owners_count":21163398,"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":["encrypted-cookies","encryption","hmac","hmac-signature","jwt","jwt-authentication","jwt-middleware","jwt-token","php","php-security","php-sessions","php-storageless-sessions","session-handler","sessions","sessionservice","sessionstorage","sessionstore"],"created_at":"2024-11-27T14:37:43.817Z","updated_at":"2025-04-13T23:46:19.594Z","avatar_url":"https://github.com/Snawoot.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# php-storageless-sessions [![Build Status](https://travis-ci.org/Snawoot/php-storageless-sessions.svg?branch=master)](https://travis-ci.org/Snawoot/php-storageless-sessions)\nSessions handler which stores session data in HMAC-signed and encrypted cookies.\n\n---\n\n:heart: :heart: :heart:\n\nYou can say thanks to the author by donations to these wallets:\n\n- ETH: `0xB71250010e8beC90C5f9ddF408251eBA9dD7320e`\n- BTC:\n  - Legacy: `1N89PRvG1CSsUk9sxKwBwudN6TjTPQ1N8a`\n  - Segwit: `bc1qc0hcyxc000qf0ketv4r44ld7dlgmmu73rtlntw`\n\n---\n\n## Requirements\n* PHP 5.4.0 or newer\n* OpenSSL extension (built-in by default)\n* Hash extension (built-in by default)\n* Enabled output buffering (`output_buffering=1` or `output_buffering=On` in php.ini)\n\n## Usage\n### Plain PHP\n```php\n\u003c?php\n\n$secret = \"reallylongsecretplease\";\n$handler = new VladislavYarmak\\StoragelessSession\\CryptoCookieSessionHandler($secret);\n\nsession_set_save_handler($handler, true);\nsession_start();\n\n$_SESSION[\"key\"] = \"value\";\n```\n### Symfony\n```yaml\nframework:\n    session:\n        handler_id:  session.handler.cookie\n\nservices:\n    session.handler.cookie:\n        class:     VladislavYarmak\\StoragelessSession\\CryptoCookieSessionHandler\n        public:    true\n        arguments:    ['reallylongsecretplease']\n```\n## Handler constructor parameters\n```\nCryptoCookieSessionHandler($secret, $expire = 2592000, $digest_algo = \"sha256\", $cipher_algo = \"aes-256-cbc\", $cipher_keylen = 32)\n```\n* `$secret` - secret passphrase used for HMAC signature and encryption\n* `$expire` - expiration time of HMAC signature\n* `$digest_algo` - hash algorithm used for key derivation and cookie signature. See `hash_algos()` for all available message digest algorithms.\n* `$cipher_algo` - cipher algorithm used for session contents encryption. See `openssl_get_cipher_methods()` for all available ciphers.\n* `$cipher_keylen` - proper key length for specified cipher algorithm, used for encryption key derivation\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnawoot%2Fphp-storageless-sessions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsnawoot%2Fphp-storageless-sessions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnawoot%2Fphp-storageless-sessions/lists"}