{"id":14987372,"url":"https://github.com/tattersoftware/codeigniter4-users","last_synced_at":"2025-10-25T06:05:08.178Z","repository":{"id":34646974,"uuid":"181110164","full_name":"tattersoftware/codeigniter4-users","owner":"tattersoftware","description":"User interfaces and provider for CodeIgniter 4","archived":false,"fork":false,"pushed_at":"2024-01-17T17:05:57.000Z","size":126,"stargazers_count":8,"open_issues_count":3,"forks_count":3,"subscribers_count":4,"default_branch":"develop","last_synced_at":"2025-03-25T19:53:10.864Z","etag":null,"topics":["authentication","codeigniter","codeigniter4","users"],"latest_commit_sha":null,"homepage":"","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/tattersoftware.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":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-04-13T02:23:04.000Z","updated_at":"2022-05-06T19:09:32.000Z","dependencies_parsed_at":"2024-06-19T15:09:20.598Z","dependency_job_id":null,"html_url":"https://github.com/tattersoftware/codeigniter4-users","commit_stats":{"total_commits":33,"total_committers":1,"mean_commits":33.0,"dds":0.0,"last_synced_commit":"1a8c75ea1b7e3d76ca2124d1bf775a959c51a622"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tattersoftware%2Fcodeigniter4-users","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tattersoftware%2Fcodeigniter4-users/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tattersoftware%2Fcodeigniter4-users/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tattersoftware%2Fcodeigniter4-users/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tattersoftware","download_url":"https://codeload.github.com/tattersoftware/codeigniter4-users/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248370314,"owners_count":21092772,"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","codeigniter","codeigniter4","users"],"created_at":"2024-09-24T14:14:31.252Z","updated_at":"2025-10-25T06:05:03.132Z","avatar_url":"https://github.com/tattersoftware.png","language":"PHP","readme":"# Tatter\\Users\nUser interfaces and provider for CodeIgniter 4\n\n[![](https://github.com/tattersoftware/codeigniter4-users/workflows/PHPUnit/badge.svg)](https://github.com/tattersoftware/codeigniter4-users/actions/workflows/test.yml)\n[![](https://github.com/tattersoftware/codeigniter4-users/workflows/PHPStan/badge.svg)](https://github.com/tattersoftware/codeigniter4-users/actions/workflows/analyze.yml)\n[![](https://github.com/tattersoftware/codeigniter4-users/workflows/Deptrac/badge.svg)](https://github.com/tattersoftware/codeigniter4-users/actions/workflows/inspect.yml)\n[![Coverage Status](https://coveralls.io/repos/github/tattersoftware/codeigniter4-users/badge.svg?branch=develop)](https://coveralls.io/github/tattersoftware/codeigniter4-users?branch=develop)\n\n## Quick Start\n\n1. Install with Composer: `\u003e composer require tatter/users`\n2. Check the list of supported factories or provide your own\n3. Access users and their methods through the provided service:\n```\n$users = service('users'); // instance of Tatter\\Users\\UserFactory\n$user  = $users-\u003efindByEmail('bill@example.com'); // instance of Tatter\\Users\\UserEntity\necho $user-\u003egetUsername(); // \"billy_jean\"\n```\n\n## Description\n\nNot an authentication module itself, `Tatter\\Users` brings common interfaces and factory\ndiscovery to simplify user integration into other libraries and projects.\n\n## Installation\n\nInstall easily via Composer to take advantage of CodeIgniter 4's autoloading capabilities\nand always be up-to-date:\n* `\u003e composer require tatter/users`\n\nOr, install manually by downloading the source files and adding the directory to\n`app/Config/Autoload.php`.\n\n## Configuration\n\nThe core of **Users** are the interfaces for User Entities and User Factories. Your project\ncan use the built-in classes or provide its own implementation, and any library that uses\n`Tatter\\Users` will then be able to work with your user classes. Currently the following\nlibraries are supported natively and with discovery:\n* [Myth:Auth](https://github.com/lonnieezell/myth-auth)\n* [CodeIgniter Shield](https://github.com/lonnieezell/codigniter-shield) *(in development)*\n* Agung Sugiarto's [CodeIgniter4 Authentication](https://github.com/agungsugiarto/codeigniter4-authentication)\n\nDiscovery will return the first `UserFactory` implementation it can locate with\nthe following priorities:\n\n1. A `UserFactory` implementation called \"UserModel\" returned by the framework's model factory. Equivalent to:\n\n\t$users = model('UserModel', ['instanceOf' =\u003e UserFactory::class])\n\n2. A discovered compatible library from `UserProvider`.\n\nNote: If your implementation is not compatible with number one then you may supply it to\nthe provider directly:\n\n\t\\Tatter\\Users\\UserProvider::addFactory(MyDiscoveryClass::class, MyFactory::class);\n\n## Usage\n\nOnce you have the necessary classes available the easiest way to access them is through\nthe Users Service:\n```\n$users = service('users')-\u003efindByEmail('bill@example.com'); // instance of Tatter\\Users\\UserFactory\n$user  = $users-\u003efindByEmail('bill@example.com'); // instance of Tatter\\Users\\UserEntity\n```\n\n## Factories\n\nThe User Factory interface defines the following methods:\n* findById()\n* findByEmail()\n* findByUsername()\n\n## Entities\n\nThe User Entity interface defines the following methods:\n* getIdentifier()\n* getId()\n* getEmail()\n* getUsername()\n* getName()\n* isActive()\n\nThere are extended interfaces in the `Tatter\\Users\\Interfaces` namespace that provide\nadditional methods which may be required by some libraries. Check your library's requirements\nto make sure you are using all the required interfaces.\n\n## Testing\n\nThere are convenience test cases in `Tatter\\Users\\Test` to enable other libraries to add\nand test their own classes. If you are looking to test your user interfaces without committing\nto a specific provider then consider adding [Tatter\\Imposter](https://github.com/tattersoftware/codeigniter4-imposter) -\na mock authentication library that is fully compliant with `Tatter\\Users`.\n\n## Development\n\nPull Requests are accepted for additional libraries and adapters. Please include the appropriate\ntests and provider code if you wish to support discovery. Requests for additional\nimplementations should be opened as a Feature Request Issue and fulfillment will depend on\navailability and sponsorship (see \"Sponsor this project\").\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftattersoftware%2Fcodeigniter4-users","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftattersoftware%2Fcodeigniter4-users","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftattersoftware%2Fcodeigniter4-users/lists"}