Download the PHP package area17/twill-http-basic-auth without Composer

On this page you can find all versions of the php package area17/twill-http-basic-auth. 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 twill-http-basic-auth

HTTP Basic Auth Twill Capsule

This Twill Capsule is intended to enable developers to configure Basic Auth on their applications.

Domains

You can add as many domains as you need and configure different passwords for each. You can have the https://site.com, for instance, unprotected to allow public access to it, and block access to https://origin.site.com and https://admin.site.com to only allow access to people with an account, and those that have access to the HTTP Basic Auth username and password.

One config for all

Once you enable the all domains (*) entry, the same configuration will be used for all domains available, and all other domain configurations will be hidden.

Middleware

A middleware is automatically added to all web routes, but you can configure this behaviour or even disable it to configure your middleware yourself:

Using authentication

If you don't want to share a single username and password with everyone that will access your pages, you can configure the package to allow existing users, both on Twill (CMS) and/or Laravel (frontend), to use their own passwords to pass Basic Auth.

Installing

Supported Versions

Composer will manage this automatically for you, but these are the supported versions between Twill and this package.

Twill Version Capsule version Installing with Composer
3.x 2.x composer require area17/twill-http-basic-auth:"^2.0"
2.x 1.x composer require area17/twill-http-basic-auth:"^1.0"

Require the Composer package:

Publish the configuration

Load Capsule helpers by adding calling the loader to your AppServiceProvider:

Configuring via the .env file

This package is disabled by default, so you must enabled it in your .env file:

You can configure credentials both via CMS settings or the on .env file. If you set them on .env the * domain will be enabled, all other domains hidden, and the username and password overloaded by the .env keys.

Database login

You can configure the package to allow users pass HTTP Auth Basic with their existing email and password, by just enabling the feature on the .env file:

Rate limiting

The package will also, by default, rate limit users to max of 500 requests per minute to each domain. You can configure it using this .env variable:

By requiring users to have an enabled account in Twill (or Laravel) to access a protected website, this becomes an additional security feature. It also allows you to avoid disclosing the same username and password to everyone who is authorized to view the site.

Contribute

Please contribute to this project by submitting pull requests.


All versions of twill-http-basic-auth with dependencies

PHP Build Version
Package Version
No informations.
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 area17/twill-http-basic-auth contains the following files

Loading the files please wait ....