{"id":28676465,"url":"https://github.com/code16/privat","last_synced_at":"2025-06-13T23:04:47.342Z","repository":{"id":56487552,"uuid":"107392735","full_name":"code16/privat","owner":"code16","description":"Password protect your in-development projects","archived":false,"fork":false,"pushed_at":"2025-02-28T18:09:20.000Z","size":330,"stargazers_count":13,"open_issues_count":2,"forks_count":8,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-03T09:13:17.779Z","etag":null,"topics":["demo","laravel","password-protection","waitingpage"],"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/code16.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":"2017-10-18T10:26:56.000Z","updated_at":"2025-02-28T18:09:23.000Z","dependencies_parsed_at":"2025-02-28T18:37:44.065Z","dependency_job_id":"69366829-b253-42f2-8a46-19caee861982","html_url":"https://github.com/code16/privat","commit_stats":{"total_commits":57,"total_committers":6,"mean_commits":9.5,"dds":"0.33333333333333337","last_synced_commit":"f325b3d983041321d29129a8259d11e4a3c3ec24"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/code16/privat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code16%2Fprivat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code16%2Fprivat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code16%2Fprivat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code16%2Fprivat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/code16","download_url":"https://codeload.github.com/code16/privat/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code16%2Fprivat/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259732773,"owners_count":22903087,"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":["demo","laravel","password-protection","waitingpage"],"created_at":"2025-06-13T23:04:46.459Z","updated_at":"2025-06-13T23:04:47.333Z","avatar_url":"https://github.com/code16.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Privat\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/code16/privat.svg?style=flat-square)](https://packagist.org/packages/code16/privat)\n[![MIT Licensed](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)\n[![Tests](https://github.com/code16/privat/actions/workflows/main.yml/badge.svg)](https://github.com/code16/privat/actions/workflows/main.yml)\n[![Total Downloads](https://img.shields.io/packagist/dt/code16/privat.svg?style=flat-square)](https://packagist.org/packages/code16/privat)\n\nPrivat is a very simple password protection for Laravel projects. It's useful for websites in a staging state.\n\n![Screenshot](screenshot.png)\n\n## Usage\n\n### Install with composer\n\n```sh\ncomposer require code16/privat\n```\n\n### Configure Privat via .env keys\n\n```sh\nPRIVAT_ENABLED=true\nPRIVAT_PASSWORD=mypassword\n```\n\n## Advanced usage\n\n### Choose impacted middleware groups\n\nBy default, Privat will protect the `web` middleware group. If you want to impact other groups, you can tweak the corresponding .env key:\n\n```sh\nPRIVAT_MIDDLEWARE_GROUP=web,admin\n```\n\n### Handle exceptions\n\nYou can exclude some hosts or URLs from Privat:\n\n```sh\nPRIVAT_EXCEPTED_URLS=\"/login,/admin\"\nPRIVAT_EXCEPTED_HOSTS=\"admin.mywebsite.com\"\n```\n\n### Waiting page\n\nIf you need to present a public waiting page, set the waiting page view name in the `PRIVAT_WAITING_VIEW` env key:\n\n```sh\nPRIVAT_WAITING_VIEW=\"demo.waiting\"\n```\n\nFrom then, all requests without the Privat registration will be redirected to `/privat_waiting` which will render the configured view, except `/privat`, which will still present the Privat form.\n\n### Publish the config file\n\nOf course, you can publish the config file instead of using env variables (even if we think it’s more convenient for such a tool):\n\n```sh\nphp artisan vendor:publish --provider=\"Code16\\Privat\\PrivatServiceProvider\"\n```\n\n## How does it work\n\nQuite simple: if the given password is correct, Privat sets a session property, and look for it on each request. So, obviously, Privat won't work on non session based systems (an API for instance).\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode16%2Fprivat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcode16%2Fprivat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode16%2Fprivat/lists"}