{"id":36167664,"url":"https://github.com/brace-project/brace-mod-session","last_synced_at":"2026-01-17T15:22:57.778Z","repository":{"id":62496498,"uuid":"339381303","full_name":"brace-project/brace-mod-session","owner":"brace-project","description":"Session middleware for Brace Core Applications","archived":false,"fork":false,"pushed_at":"2024-08-20T10:07:28.000Z","size":42,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-11T06:37:20.581Z","etag":null,"topics":["middleware-modul","php-session"],"latest_commit_sha":null,"homepage":"https://infracamp.org/","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/brace-project.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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":"2021-02-16T11:48:10.000Z","updated_at":"2024-08-20T10:07:32.000Z","dependencies_parsed_at":"2024-08-20T12:27:19.121Z","dependency_job_id":null,"html_url":"https://github.com/brace-project/brace-mod-session","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/brace-project/brace-mod-session","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brace-project%2Fbrace-mod-session","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brace-project%2Fbrace-mod-session/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brace-project%2Fbrace-mod-session/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brace-project%2Fbrace-mod-session/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brace-project","download_url":"https://codeload.github.com/brace-project/brace-mod-session/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brace-project%2Fbrace-mod-session/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28511363,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T13:38:16.342Z","status":"ssl_error","status_checked_at":"2026-01-17T13:37:44.060Z","response_time":85,"last_error":"SSL_read: 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":["middleware-modul","php-session"],"created_at":"2026-01-11T01:04:18.133Z","updated_at":"2026-01-17T15:22:57.756Z","avatar_url":"https://github.com/brace-project.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Action Status](https://github.com/brace-project/brace-mod-session/workflows/test/badge.svg)](https://github.com/brace-project/brace-mod-session/actions)\n[![Latest Stable Version](https://poser.pugx.org/brace/mod-session/v)](//packagist.org/packages/brace/mod-session)\n[![Total Downloads](https://poser.pugx.org/brace/mod-session/downloads)](//packagist.org/packages/brace/mod-session)\n[![License](https://poser.pugx.org/brace/mod-session/license)](//packagist.org/packages/brace/mod-session)\n\n\n# brace-mod-session\n\nSession middleware for Brace Core Applications\n\n### Installation\n\n```sh\ncomposer require brace/mod-session\n```\n\n### Usage\n\nYou can use the `Brace\\Session\\SessionMiddleware` in any\n[Brace Core Application](https://github.com/brace-project/brace-core).\n\nthis would look like following:\n\n```php\n\\Brace\\Core\\AppLoader::extend(function (\\Brace\\Core\\BraceApp $app) {\n    (/*.....*/)\n    $app-\u003esetPipe([\n        new \\Brace\\Session\\SessionMiddleware(\n            new \\Brace\\Session\\Storages\\FileSessionStorage(\"/tmp\"), // replace this with your chosen storage type and connection string\n            3600, // 1 hour ttl\n            86400 // 1 day expiration time\n        ),\n        (/*.....*/)\n    ]);\n});\n```\n\nAfter this, you can access the session data inside any route/middleware that\nhas access to the `\\Brace\\Core\\BraceApp` :\n\n```php\nAppLoader::extend(function (BraceApp $app) {\n    $app-\u003erouter-\u003eon(\"GET@/\", function() use ($app) {\n        $session = $app-\u003eget(SessionMiddleware::SESSION_ATTRIBUTE);\n        $session-\u003eset('foo', 'bar');\n        (/*....*/)\n        return $response;\n    });\n});\n\n```\n\n### Examples\n\n### Contributing\n\nPlease refer to the [contributing notes](CONTRIBUTING.md).\n\n### License\n\nThis project is made public under the [MIT LICENSE](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrace-project%2Fbrace-mod-session","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrace-project%2Fbrace-mod-session","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrace-project%2Fbrace-mod-session/lists"}