{"id":25735910,"url":"https://github.com/web-id-fr/ail","last_synced_at":"2025-05-07T23:21:17.114Z","repository":{"id":63659447,"uuid":"568723501","full_name":"web-id-fr/Ail","owner":"web-id-fr","description":"Authentication page to change user easily with interface","archived":false,"fork":false,"pushed_at":"2023-03-20T03:02:20.000Z","size":120,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-31T15:08:51.467Z","etag":null,"topics":["authentication","debug","guard","impersonate","laravel","package"],"latest_commit_sha":null,"homepage":"https://web-id.fr/fr/blog/decryptage/on-vous-presentenotre-nouveau-package-dimpersonate","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/web-id-fr.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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":"2022-11-21T09:23:00.000Z","updated_at":"2022-12-15T01:13:15.000Z","dependencies_parsed_at":"2025-02-26T05:43:03.531Z","dependency_job_id":null,"html_url":"https://github.com/web-id-fr/Ail","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":"spatie/package-skeleton-laravel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web-id-fr%2FAil","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web-id-fr%2FAil/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web-id-fr%2FAil/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web-id-fr%2FAil/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/web-id-fr","download_url":"https://codeload.github.com/web-id-fr/Ail/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252968913,"owners_count":21833377,"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","debug","guard","impersonate","laravel","package"],"created_at":"2025-02-26T05:32:52.435Z","updated_at":"2025-05-07T23:21:17.092Z","avatar_url":"https://github.com/web-id-fr.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AIL - Authentication with Impersonate guarded by a Lion\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/web-id/ail.svg?style=flat-square)](https://packagist.org/packages/web-id/ail)\n[![Total Downloads](https://img.shields.io/packagist/dt/web-id/ail.svg?style=flat-square)](https://packagist.org/packages/web-id/ail)\n\nAuthentication page to change user easily\n\n![Ail homepage](https://github.com/web-id-fr/Ail/blob/main/src/commun/ail.png?raw=true \"Ail homepage\")\n\n## Installation\n\n### 1/ Composer\n\nYou can install the package via composer:\n\n```bash\ncomposer require web-id/ail\n```\n\n### 2/ Package installation\n\nInstall the package (config file and views) with this command :\n\n```bash\nphp artisan ail:install\n```\n\n### 3/ Configuration\n\nUpdate the config, especially `guard` and `allowedEnv`.\n\nThis is the content of the published config files:\n\n```php\nreturn [\n    /*\n    |--------------------------------------------------------------------------\n    | Route configuration\n    |--------------------------------------------------------------------------\n    |\n    | These values will change the route configuration for the application routes.\n    | You can define the prefix, the name and set your own middleware on it.\n    | Web middleware is required for authentication and CanImpersonate for security.\n    |\n    */\n\n    'routes' =\u003e [\n        'prefix' =\u003e 'ail',\n        'name' =\u003e 'ail',\n        'middlewares' =\u003e [\n            'web',\n            CanImpersonate::class,\n        ],\n    ],\n\n    /*\n    |--------------------------------------------------------------------------\n    | Guards to display\n    |--------------------------------------------------------------------------\n    |\n    | This value is a list of guards that you want to display and impersonate. You\n    | need to set the name on key and the service builder on value. The service\n    | builder is required for search bar on view. By default, you can use\n    | SearchUser::class that search on `name` attribute. You are free and encouraged\n    | to create your own service.\n    |\n    */\n\n    'guards' =\u003e [\n        'web' =\u003e SearchUser::class,\n    ],\n\n    /*\n    |--------------------------------------------------------------------------\n    | Allowed environment security\n    |--------------------------------------------------------------------------\n    |\n    | This value is a list of environments authorized for this package. It will\n    | use APP_ENV. WARNING : This package is not recommended on risky environments\n    | like production or preprod with sensitive data.\n    */\n\n    'allowedEnv' =\u003e [\n        'local',\n        'preproduction',\n    ],\n\n    /*\n    |--------------------------------------------------------------------------\n    | Pagination\n    |--------------------------------------------------------------------------\n    |\n    | This value is the pagination number for view.\n    |\n    */\n\n    'perPage' =\u003e 15,\n];\n```\n\n### 4/ Update Models\n\nAdd `Impersonate` Trait on Authenticatable Models you want to impersonate.\n\n```php\nclass User extends Authenticatable\n{\n    use Impersonate;\n}\n```\n\n### 5/ Update Views\n\nYou can add your own logic on resources/views/vendors/ail.\n\nBy default, it will display the `name` attribute.\n\n### 6/ More options\n\nSee : [https://github.com/404labfr/laravel-impersonate](https://github.com/404labfr/laravel-impersonate)\n\nWARNING : Don't forget to set authorization for who can impersonate : [https://github.com/404labfr/laravel-impersonate#defining-impersonation-authorization](https://github.com/404labfr/laravel-impersonate#defining-impersonation-authorization)\n\nBy default all users can be impersonated.\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.\n\n## Credits\n\n- [Leo Tiollier](https://github.com/LTiollier)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweb-id-fr%2Fail","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweb-id-fr%2Fail","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweb-id-fr%2Fail/lists"}