{"id":14987375,"url":"https://github.com/grimpirate/halberd","last_synced_at":"2025-04-12T00:02:32.780Z","repository":{"id":78826665,"uuid":"605628829","full_name":"grimpirate/halberd","owner":"grimpirate","description":"A TOTP (Time-Based One-Time Password) Two-Factor Authentication Module for codeigniter4/shield","archived":false,"fork":false,"pushed_at":"2025-01-02T19:04:02.000Z","size":3962,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"develop","last_synced_at":"2025-03-25T19:51:12.990Z","etag":null,"topics":["authentication","codeigniter4","totp"],"latest_commit_sha":null,"homepage":"https://github.com/grimpirate/halberd","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/grimpirate.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-23T15:07:07.000Z","updated_at":"2025-01-02T19:04:05.000Z","dependencies_parsed_at":"2024-09-09T22:28:23.938Z","dependency_job_id":"8eb61d31-db87-41cc-9f71-f940eb5232f4","html_url":"https://github.com/grimpirate/halberd","commit_stats":{"total_commits":1275,"total_committers":42,"mean_commits":"30.357142857142858","dds":0.5121568627450981,"last_synced_commit":"22ba73bc49cacbd2e0e9a48ac34dc9f22c4535c3"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grimpirate%2Fhalberd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grimpirate%2Fhalberd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grimpirate%2Fhalberd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grimpirate%2Fhalberd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grimpirate","download_url":"https://codeload.github.com/grimpirate/halberd/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248497804,"owners_count":21113984,"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","codeigniter4","totp"],"created_at":"2024-09-24T14:14:31.534Z","updated_at":"2025-04-12T00:02:32.737Z","avatar_url":"https://github.com/grimpirate.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Halberd\nA TOTP (Time-Based One-Time Password) Two-Factor Authentication Module for [codeigniter4/shield](https://github.com/codeigniter4/shield)\n## Installation\nProject should have a stability level of dev\n```\ncomposer config minimum-stability dev\ncomposer config prefer-stable true\ncomposer require grimpirate/halberd:dev-develop\n```\n## Configuration\nThe TOTP authenticator class must be added to the Config/Auth file\n```\n...\n\nclass Auth extends BaseConfig\n{\n\n  ...\n\n  public array $authenticators = [\n    'tokens'  =\u003e AccessTokens::class,\n    'session' =\u003e Session::class,\n    'hmac'    =\u003e HmacSha256::class,\n    // 'jwt'     =\u003e JWT::class,\n    'totp'    =\u003e \\GrimPirate\\Halberd\\Authentication\\Authenticators\\TOTP::class,\n  ];\n\n  ...\n```\nA spark command is provided to finalize installation. It will use [codeigniter4/settings](https://github.com/codeigniter4/settings) to set up the configuration for: Auth.views, Auth.actions, TOTP.issuer and TOTP.stylesheet\n```\nphp spark halberd:ini\n```\nThe dependency [pragmarx/google2fa](https://github.com/antonioribeiro/google2fa?tab=readme-ov-file#server-time) requires that your server time be accurately synchronized (via NTP or some other means). CodeIgniter's [appTimezone](https://github.com/codeigniter4/CodeIgniter4/blob/655bd1de0c460b0e1353d2ead8ecff956ac08ccc/app/Config/App.php#L136) will not affect OTP generation.\n\nThe QR Code will not be visible without creating a stylesheet and applying some basic styles, for instance\n```\nsvg\n{\n  width: 100%;\n  height: 240px;\n  fill-rule: evenodd;\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrimpirate%2Fhalberd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrimpirate%2Fhalberd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrimpirate%2Fhalberd/lists"}