{"id":19341895,"url":"https://github.com/iris-it/lmod-authz","last_synced_at":"2026-02-28T22:01:22.295Z","repository":{"id":56993431,"uuid":"101043403","full_name":"iris-it/lmod-authz","owner":"iris-it","description":null,"archived":false,"fork":false,"pushed_at":"2018-01-04T10:00:24.000Z","size":87,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-24T08:45:55.501Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"HTML","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/iris-it.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-22T09:03:01.000Z","updated_at":"2017-09-13T14:37:27.000Z","dependencies_parsed_at":"2022-08-21T10:40:38.614Z","dependency_job_id":null,"html_url":"https://github.com/iris-it/lmod-authz","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/iris-it/lmod-authz","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iris-it%2Flmod-authz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iris-it%2Flmod-authz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iris-it%2Flmod-authz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iris-it%2Flmod-authz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iris-it","download_url":"https://codeload.github.com/iris-it/lmod-authz/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iris-it%2Flmod-authz/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29953212,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-28T18:42:55.706Z","status":"ssl_error","status_checked_at":"2026-02-28T18:42:48.811Z","response_time":90,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":[],"created_at":"2024-11-10T03:33:02.543Z","updated_at":"2026-02-28T22:01:22.272Z","avatar_url":"https://github.com/iris-it.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Authz Module\n\nDocumentation du module d'authentification et d'authorisation\n\n## Fonctionnalités\n\n#### Guest\n- Sign up ✓\n- Sign in ✓\n- Forgot password ✓\n- Reset password ✓\n\n#### User\n- Edit account information ✓\n- Edit account password ✓\n\n#### Admin\n- List of users\n-- Create user ✓\n-- Edit user ✓\n-- Enable / Disable user\n-- Send password on new user ✓\n-- Assign role to user ✓\n\n- List of permissions \n-- Parse from source file ✓\n-- Edit descriptions\n\n- List of roles\n-- Create role\n-- Edit role \n--- Assign permissions to role\n\n## Install\n\nBegin by installing this package through Composer. Edit your project's composer.json file to require laravelcollective/html.\n\ncomposer require `\"laravelcollective/html\":\"^5.4.0\"`\n\nNext, add your new provider to the providers array of config/app.php:\n\n```php\n  'providers' =\u003e [\n    // ...\n    Collective\\Html\\HtmlServiceProvider::class,\n    Irisit\\Authz\\AuthzServiceProvider::class,\n    // ...\n  ],\n```\n\nFinally, add two class aliases to the aliases array of config/app.php:\n\n```php\n  'aliases' =\u003e [\n    // ...\n      'Form' =\u003e Collective\\Html\\FormFacade::class,\n      'Html' =\u003e Collective\\Html\\HtmlFacade::class,\n    // ...\n  ],\n```\n\nReplace all the in the `App\\User::class`\n```\n\u003c?php\n\nnamespace App;\n\nuse Illuminate\\Notifications\\Notifiable;\nuse Irisit\\Authz\\Models\\BaseUser as Authenticatable;\n\nclass User extends Authenticatable\n{\n    use Notifiable;\n\n    /**\n     * The attributes that are mass assignable.\n     *\n     * @var array\n     */\n    protected $fillable = [\n        'firstname',\n        'lastname',\n        'email',\n        'password',\n        'role_id'\n    ];\n\n    /**\n     * The attributes that should be hidden for arrays.\n     *\n     * @var array\n     */\n    protected $hidden = [\n        'password', 'remember_token',\n    ];\n}\n```\n\n\nReplace in migrations the `name` attribute by \n```\n$table-\u003estring('firstname');\n$table-\u003estring('lastname'); \n```\n\nReplace the line in `App\\Http\\Kernel.php`\n\n`'guest' =\u003e \\App\\Http\\Middleware\\RedirectIfAuthenticated::class,`\n\nby\n\n`'guest' =\u003e \\Irisit\\Authz\\Http\\Middleware\\RedirectIfAuthenticated::class,`\n\nAnd add at the end ( after guest )\n \n`'role' =\u003e \\Irisit\\Authz\\Http\\Middleware\\RedirectIfNotRole::class,`\n\nso you can use the middleware 'role' to protect a route or a group like this `middleware =\u003e 'role:admin,manager'`\n\n\nRun \n\n`php artisan db:seed --class=Irisit\\Authz\\Database\\Seeds\\DatabaseSeeder`\n\nAdd to config/filesystem.php\n\n```\n        'base' =\u003e [\n            'driver' =\u003e 'local',\n            'root' =\u003e base_path() . DIRECTORY_SEPARATOR,\n        ],\n```\n\nAdd this to app/Exceptions/Handler.php\n```php\n/**\n * @override\n * @param \\Illuminate\\Http\\Request $request\n * @param AuthenticationException $exception\n * @return \\Illuminate\\Http\\JsonResponse|\\Illuminate\\Http\\RedirectResponse|\\Illuminate\\Http\\Response\n */\nprotected function unauthenticated($request, AuthenticationException $exception)\n{\n    return $request-\u003eexpectsJson()\n        ? response()-\u003ejson(['message' =\u003e 'Unauthenticated.'], 401)\n        : redirect()-\u003eguest(route('authz.get_login'));\n}\n```\n\n\nAnd run `php artisan vendor:publish --provider=\"Irisit\\Authz\\AuthzServiceProvider\"` to get the configuration file and the seeder file \n\nFor the seeder add `$this-\u003ecall(RoleTableSeeder::class);` to the `/database/seeders/DatabaseSeeder.php`","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Firis-it%2Flmod-authz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Firis-it%2Flmod-authz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Firis-it%2Flmod-authz/lists"}