{"id":37236441,"url":"https://github.com/imarc/craft-password-protection","last_synced_at":"2026-01-16T04:53:11.855Z","repository":{"id":49867770,"uuid":"289098021","full_name":"imarc/craft-password-protection","owner":"imarc","description":"This is a Craft CMS plugin that allows for password protecting any page in your CMS intuitively and without any hassle.","archived":false,"fork":false,"pushed_at":"2022-10-24T14:55:34.000Z","size":182,"stargazers_count":2,"open_issues_count":7,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2026-01-14T14:53:08.546Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","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/imarc.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2020-08-20T19:56:30.000Z","updated_at":"2023-03-02T18:12:29.000Z","dependencies_parsed_at":"2022-09-09T13:11:17.838Z","dependency_job_id":null,"html_url":"https://github.com/imarc/craft-password-protection","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/imarc/craft-password-protection","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imarc%2Fcraft-password-protection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imarc%2Fcraft-password-protection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imarc%2Fcraft-password-protection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imarc%2Fcraft-password-protection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/imarc","download_url":"https://codeload.github.com/imarc/craft-password-protection/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imarc%2Fcraft-password-protection/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28442370,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-15T00:55:22.719Z","status":"online","status_checked_at":"2026-01-15T02:00:08.019Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":"2026-01-15T04:14:34.832Z","updated_at":"2026-01-15T04:14:35.335Z","avatar_url":"https://github.com/imarc.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Password Protection plugin for Craft CMS 3.x\n\nThis is a Craft CMS plugin that allows for password protecting any page in your CMS intuitively and without any hassle.\n\n![Screenshot](resources/img/plugin-logo.png)\n\n## Requirements\n\nThis plugin requires Craft CMS 3.0.0-beta.23 or later.\n\n## Installation\n\nTo install the plugin, follow these instructions.\n\n1. Open your terminal and go to your Craft project:\n\n        cd /path/to/project\n\n2. Then tell Composer to load the plugin:\n\n        composer require imarc/craft-password-protection\n\n3. In the Control Panel, go to Settings → Plugins and click the “Install” button for Password Protection.\n\n\n## Configuring Password Protection\n#### Default Password\nWhen you set a default password that value will be used as a default for any page where Lock Screen is enabled and the password field is left empty. When this setting it left empty and no password is provided for a lock screen then the lock screen will automatically be disabled.\n\n#### Password Cookie Duration\nThis setting defines how long the user will be remembered for. The value entered is in seconds, so for example to get one day you would do 86400. Default is 1 day.\n\n#### Template\nThis allows for defining of a custom login page. Simply create a template in your project where you have a form with a field that is named `password_protect` and then define the route for that template in the settings for password protect. For a template located in `tempalates/password-protect/login.twig` the path entered would be `password-protect/login` or `/password-protect/login`. Here is an example of a simple template: \n```\n\u003cform method=\"POST\"\u003e\n    \u003ch1\u003e{{ 'Enter Password'|t }}\u003c/h1\u003e\n    \u003cdiv\u003e\n        {{ csrfInput() }}\n        \n        {% set message = craft.app.session.getFlash('protect_error') %}\n        {% if message|length \u003e 0 %}\n            \u003cdiv class=\"alert\"\u003e\n                \u003cp class=\"error\"\u003e{{ message }}\u003c/p\u003e\n            \u003c/div\u003e\n        {% endif %}\n        \n        \u003cinput type=\"password\" name=\"protect_password\"\u003e\n        \u003cinput type=\"submit\" value=\"{{ 'Submit'|t}}\"\u003e\n    \u003c/div\u003e\n\u003c/form\u003e\n```\n\n## Using Password Protection\n\nTo start using Password Protection on a page simply login to the admin panel, then go to Entries and click the entry that you would like to protect. Once on the edit page on the right side of the screen you will see a lightswitch labeled 'Enable Password Protect'. Just toggle it on/off and enter a passphrase if you want that page protected. When you're done don't forget to click save in the top right and then you are ready to go!\n\nNow when users go to that page they will get prompted with a default password page, or a custom password page if defined.\n![Screenshot](resources/img/protect-screen.png)\n\n#### Note\nOnce a user enters a password correctly, a cookie will be stored and they won't have to re-enter the passphrase until the cookie expires. Also any user that is logged in will automatically be granted access to ALL password protected pages. It's on the road map to allow customization of which users will be prompted on certain pages.\n\n## Password Protection Roadmap\n\nSome things to do, and ideas for potential features:\n\n* Allow customization of which logged in users will be prompted for a password on certain pages\n\nBrought to you by [Imarc](https://www.imarc.com/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimarc%2Fcraft-password-protection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimarc%2Fcraft-password-protection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimarc%2Fcraft-password-protection/lists"}