Download the PHP package bitexpert/sylius-force-login-plugin without Composer

On this page you can find all versions of the php package bitexpert/sylius-force-login-plugin. 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 sylius-force-login-plugin

Force Login Plugin for Sylius

Build Status installs on Packagist Mastodon Follow

The Force Login Plugin for Sylius allows you to restrict which pages a visitor is able to see. Visitors get redirected to the login page if the page is not marked visitable. The Force Login Module for Sylius is especially useful for merchants serving only a specific group of users, e.g. enterprise related business partners and need to ensure that only those users are able to browse the website or the product catalog.

Features:

Requirements:

Installation

  1. Install the plugin via Composer

  2. Enable the plugin

  3. Import config

  4. Import routing

  5. Update your database schema

User Guide

How to use

The usage of the Force Login Module for Sylius is applied implicitly by redirecting visitors if the called URI does not match any configured whitelisted url rules.

Whitelisting

Whitelisting is based upon the usage of rules. The strategy selection defines how the rules are interpreted, details are listed below. The following example shows, how to add a whitelist entry for the homepage (startpage).

In Sylius Admin navigate to Configuration > Force Login and use the Create button to create a new entry.

Use the Create button to save the entry. After being redirected to the Overview Grid, the new entry should appear to the list.

How to configure

Strategies

Static

Rule is used as a literal value and will be added onto the base url for matching. This is default behaviour.

RegEx

Rule is based on regular expression, and will be used for looking up matching anywhere in the current url.

Negated RegEx

Based on the RegEx strategy, but negates the result. Helpful if only a few pages should be restricted.

Add custom strategy

The strategy configuration is meant to be extensible. You can create an own strategy by creating a new class that implements the \BitExpert\SyliusForceCustomerLoginPlugin\Model\StrategyInterface interface. Your custom class needs to be registered as a service and be annotated with #[AsUrlStrategy].

Tests

You can run the unit tests with the following command (requires dependency installation):

./vendor/bin/phpunit

Contribution

Feel free to contribute to this module by reporting issues or create some pull requests for improvements.

License

The Force Login Module for Sylius is released under the MIT license.


All versions of sylius-force-login-plugin with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
sylius/sylius Version ^2.0
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 bitexpert/sylius-force-login-plugin contains the following files

Loading the files please wait ....