{"id":18550281,"url":"https://github.com/xp-forge/htmx","last_synced_at":"2025-11-01T09:30:22.843Z","repository":{"id":219639703,"uuid":"749523594","full_name":"xp-forge/htmx","owner":"xp-forge","description":"HTMX for XP web frontends","archived":false,"fork":false,"pushed_at":"2025-02-03T12:40:22.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-03T13:38:49.822Z","etag":null,"topics":["authentication","htmx","php7","php8","xp-framework"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/xp-forge.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog.md","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":"2024-01-28T20:20:50.000Z","updated_at":"2025-02-03T12:39:17.000Z","dependencies_parsed_at":"2024-03-01T21:29:49.189Z","dependency_job_id":"ca21f33b-5f3c-4694-99e5-b102b62f5e73","html_url":"https://github.com/xp-forge/htmx","commit_stats":null,"previous_names":["xp-forge/htmx"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xp-forge%2Fhtmx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xp-forge%2Fhtmx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xp-forge%2Fhtmx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xp-forge%2Fhtmx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xp-forge","download_url":"https://codeload.github.com/xp-forge/htmx/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239270482,"owners_count":19610981,"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":["authentication","htmx","php7","php8","xp-framework"],"created_at":"2024-11-06T21:04:04.984Z","updated_at":"2025-11-01T09:30:22.772Z","avatar_url":"https://github.com/xp-forge.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"HTMX for XP web frontends\n=========================\n\n[![Build status on GitHub](https://github.com/xp-forge/htmx/workflows/Tests/badge.svg)](https://github.com/xp-forge/htmx/actions)\n[![XP Framework Module](https://raw.githubusercontent.com/xp-framework/web/master/static/xp-framework-badge.png)](https://github.com/xp-framework/core)\n[![BSD Licence](https://raw.githubusercontent.com/xp-framework/web/master/static/licence-bsd.png)](https://github.com/xp-framework/core/blob/master/LICENCE.md)\n[![Requires PHP 7.4+](https://raw.githubusercontent.com/xp-framework/web/master/static/php-7_4plus.svg)](http://php.net/)\n[![Supports PHP 8.0+](https://raw.githubusercontent.com/xp-framework/web/master/static/php-8_0plus.svg)](http://php.net/)\n[![Latest Stable Version](https://poser.pugx.org/xp-forge/htmx/version.svg)](https://packagist.org/packages/xp-forge/htmx)\n\nHTMX Integration\n\nAuthentication\n--------------\nWrap any authentication flow in a *HtmxFlow* to ensure authentication does not redirect but instead yields an error code and triggers an event:\n\n```diff\n+ use web\\frontend\\HtmxFlow;\n\n- $auth= new SessionBased($flow, $sessions);\n+ $auth= new SessionBased(new HtmxFlow($flow), $sessions);\n```\n\nHandle this inside JavaScript with something along the lines of the following:\n\n```javascript\nwindow.addEventListener('authenticationexpired', e =\u003e {\n  if (confirm('Authentication expired. Do you want to re-authenticate?')) {\n    window.location.reload();\n  }\n});\n````\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxp-forge%2Fhtmx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxp-forge%2Fhtmx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxp-forge%2Fhtmx/lists"}