Download the PHP package t4web/authentication without Composer
On this page you can find all versions of the php package t4web/authentication. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download t4web/authentication
More information about t4web/authentication
Files in t4web/authentication
Package authentication
Short Description A generic user authentication module for ZF2.
License BSD-3-Clause
Homepage https://github.com/t4web/Authentication
Informations about the package authentication
Authentication
Authentication module for zf2
Contents
- Introduction
- Installation
- Configuring
- Adapters
- Testing
Introduction
Very simple authentication from the Box - define accounts config with login and password and use.
Installation
Main Setup
By cloning project
Clone this project into your ./vendor/
directory.
With composer
Add this project in your composer.json:
Now tell composer to download Authentication by running the command:
Post installation
Enabling it in your application.config.php
file.
Configuring
For define which page need authorization, you can redeclare need-authorization-callback
, by default:
For change auth login form layout you can define layout
route param, for change
redirect uri after success authorization, you can define redirect-to-url
route param:
By default auth use php array for auth storage, but you can write own:
Adapter\MyAdapter
must implement Zend\Authentication\Adapter\ValidatableAdapterInterface
.
Adapters
This module contain two adapters in the Box PhpArray
and Table
.
PhpArray adapter
This adapter use by default.
For define logins and passwords just describe it in you config in auth-accounts
section:
Table adapter
This is wrapper for Zend\Authentication\Adapter\DbTable\CallbackCheckAdapter
, for start use, define it in your config:
and describe auth['table-adapter']
config:
Testing
Unit test runnig from authentication module directory.
For running Functional tests you need create codeception.yml in you project root, like this:
After this you may run functional tests from your project root
All versions of authentication with dependencies
zendframework/zend-authentication Version ~2.5.0
zendframework/zend-console Version ~2.5.0
zendframework/zend-eventmanager Version ~2.5.0
zendframework/zend-http Version ~2.5.0
zendframework/zend-modulemanager Version ~2.5.0
zendframework/zend-mvc Version ~2.5.0
zendframework/zend-servicemanager Version ~2.5.0
zendframework/zend-session Version ~2.5.0
zendframework/zend-view Version ~2.5.0
t4web/session Version ^1.0
t4web/event-subscriber Version ~1.0.0