Download the PHP package echo-fusion/authmanager without Composer

On this page you can find all versions of the php package echo-fusion/authmanager. 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 authmanager

AuthManager

CI Packagist PHP

AuthManager handles authentication for the EchoFusion framework: who is the current user, log in, log out, and protecting routes. It supports session and token authentication from the start, chosen in configuration, and anything else you plug in.

It depends only on echo-fusion/contracts and PSR interfaces. It does not require sessionmanager, databasemanager, an ORM or an entity class: it talks to a SessionInterface, a ConnectionInterface and a PSR-17 response factory, and the application decides what sits behind them.

Part of EchoFusion, a modular PHP framework built from small packages.

Installation

Requirements

Configuration

Usage

attempt() looks the user up by every credential except password (so ['email' => ...], or ['email' => ..., 'active' => 1]), then checks the password against the stored hash.

Register a user

API tokens

Tokens are stored as a SHA-256 hash, never in plain text. Create one like this:

Middleware (PSR-15)

Neither one ever calls header() or exit(); they return PSR-7 responses.

Security notes

Requirements of the container

AuthManager receives a PSR-11 container and fetches what a configured guard needs, only when it is first used:

Needed for Container entry
a session guard EchoFusion\Contracts\SessionManager\SessionInterface
a database provider EchoFusion\Contracts\DatabaseManager\ConnectionInterface (or DatabaseManagerInterface when the provider names a connection)
the middleware (via the service provider) Psr\Http\Message\ResponseFactoryInterface

Service provider

EchoFusion\AuthManager\Providers\AuthManagerProvider registers AuthManagerInterface, GuardInterface (the default guard), PasswordHasherInterface, AuthenticateMiddleware and GuestMiddleware, and configures the manager from the auth section of your configuration on boot().

Your own guard or provider

Implement GuardInterface (or StatefulGuardInterface) or UserProviderInterface from the contracts and reference the class with 'class'. A guard that needs the request (like the token guard) can also implement EchoFusion\AuthManager\Guards\RequestAwareGuardInterface; the middleware hands it the request.

Testing

Credits

License

The MIT License (MIT). Please see LICENSE for more information.


All versions of authmanager with dependencies

PHP Build Version
Package Version
Requires php Version ~8.1.0 || ~8.2.0 || ~8.3.0
echo-fusion/contracts Version ^1.8 || ^2.0
psr/container Version ^2.0
psr/http-message Version ^2.0
psr/http-factory Version ^1.0
psr/http-server-handler Version ^1.0
psr/http-server-middleware Version ^1.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 echo-fusion/authmanager contains the following files

Loading the files please wait ...