Download the PHP package zozlak/auth without Composer

On this page you can find all versions of the php package zozlak/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 auth

Auth

Latest Stable Version Build status Coverage Status License

A simple yet flexible library for authenticating against different providers.

Currently supported authorization providers:

Currently supported users database backends:

Usage

Simple example trying to authenticate with Google, then with HTTP basic and finally using a fixed zzz user as a fallback.

Combining many authentication methods

Chaining many authentication methods is easy until it's only checking credentials provided by a client in his request.

The problem starts when request contains no (valid) credentials and we want to explicitely ask user to include them. The problem is in most cases we can advertise only one auth method at once. This is because different auth methods use conflicting advertisment mechanism, e.g.

Control over advertising auth methods is provided in the following way:

You assigne the advertisment level when adding it to the auth chain using the second parameter of the AutController::addMethod(AuthMethodInterface $method, int $advertise) method. By default it's AuthMethod::ADVERTISE_NONE

Remember Guest, GoogleToken and TrustedHeaders don't support advertisment.

HTTP Digest method

HTTP Digest is difficult to combine with any other auth method. Unlike other methods the HTTP Digest has to be advertised to the client before his request so he can prepare valid credentials. And once it is advertised all GUI clients (most notably web browsers) will keep asking user for a login and password until valid ones are provided making it impossible to use any other authentication method.

(Poor) workarounds for this problem are:


All versions of auth with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
guzzlehttp/guzzle Version ^7.8
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 zozlak/auth contains the following files

Loading the files please wait ....