Download the PHP package johannschopplich/kirby-locked-pages without Composer

On this page you can find all versions of the php package johannschopplich/kirby-locked-pages. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package kirby-locked-pages

# Kirby Locked Pages Password-protect a page – and its entire subtree – behind a login form, for the Kirby CMS. [Features](#features) • [Options](#options) • [Security Scope](#security-scope)

When to Use

I want to… Use
Password-protect a page and its children fields/locked-pages blueprint group
Give visitors a logout link locked-pages.logout hook
Restyle the password form site/templates/locked-pages-login.php
Check lock state from my own code Guard::isLocked($page)
Change the login slug, title, or error messages johannschopplich.locked-pages options

Features

🔒 Password Protection

Toggle protection on any page through a globally registered blueprint field group. Visitors are redirected to a login form until they enter the correct password, and the grant is then stored in their session.

The group adds a lockedPagesEnable toggle and a lockedPagesPassword field. Drafts and the error page are never locked, even when the fields are set.

🌳 Subtree Inheritance

Locking a page locks its whole subtree – you only add the field group at the subtree root. Unlocking the parent grants access to every descendant, keyed by the page's language-independent ID, so one unlock covers all translations. Content representations (.json, .xml, .rss, …) are locked alongside the page.

🚪 Logout Hook

Clear a visitor's grants by triggering the locked-pages.logout hook. Wire it to a route, then show a logout link only while the session holds a grant.

🎨 Custom Login Template

The plugin ships a self-contained login template. Drop your own locked-pages-login.php into site/templates/ and Kirby uses it automatically – the bundled template is a good starting point.

Requirements

Installation

Composer (Recommended)

Manual Installation

Download and copy this repository to /site/plugins/kirby-locked-pages.

Options

All options are namespaced under johannschopplich.locked-pages:

Option Default Description
slug locked Slug of the login form, relative to the site URL.
template locked-pages-login Template name for the login form.
title Page locked Title rendered on the login form.
longSession true Keep grants in a long (2-week) session with no idle timeout. false for a 2-hour one.
error.password The password is incorrect Message shown after a wrong password.
error.csrf The CSRF token is invalid Message shown when the CSRF token fails.

Example config.php:

Security Scope

This plugin gates page rendering – nothing else. Know its limits before relying on it:

Credits

Inspired by kirby-securedpages.

License

Johann Schopplich


All versions of kirby-locked-pages with dependencies

PHP Build Version
Package Version
Requires getkirby/composer-installer Version ^1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package johannschopplich/kirby-locked-pages contains the following files

Loading the files please wait ...