Download the PHP package ujjwal/auth without Composer

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

A Zend framework module based on ZfcUser to check if user is logged in and to manage session, session save handler etc.

Note

This module is currently unmaintained. Please use HtSession instead.

Requirements

Installation

Options

Check Options available in config/Auth.local.php

Features

Modules and Controllers Access

With this module you can restrict unauthorized users from accessing certain controllers and modules. This can be done easily from module options. To do so, edit the Auth.local.php

$auth_settings = array(

    /**
     * Log In Modules
     *
     * Please set modules where logged in user can only gain access
     */
    'modules' => array(
            'Admin',
            'Application',    
    ),

    /**
     * Controllers where you can set if user can access or not
     *
     * 'controllers' => array(
        'include' => array(), // Please set controllers where logged in user can only gain access

        'exclude' => array(), // Please set controllers where public user as well as logged in user can gain access
        // Note that, this part will override above `include` and `modules`
     ),
    */

);

Session configurations

You can set all the session options as session name, save path, save handler etc. To do so, edit the Auth.local.php as follows:

$session_settings = array(
    /**
     * Session Config Class
     *
     * Name of class used to manage session config options. Useful to create your own
     * Session Config Class.  Default is Zend\Session\Config\SessionConfig.
     * The class should implement Zend\Session\Config\ConfigInterface.
     */
    //'config_class' => 'Zend\Session\Config\SessionConfig',

    /**
     * Session Config Options
     *
     * session options such as name, save_path can be set from here
     * This is the part sent to Session Config Class. Default is empty array.
     */
    'config_options' => array(
            'name' => 'my_application',
            'save_path' => 'data/session'
    ),

);

Session set save handler

This module also comes with session set save handler to store session data in database. By default session_set_save_hander is already enabled. If you want to disable it, disable it in the following settings:

$session_settings = array(
    /**
     * Use session save handler or not.
     * 
     * Default is true. Useful to store session data in database
     * see http://php.net/manual/en/function.session-set-save-handler.php
     * Accept values: true and false
     */
    //'save_handler_or_not' => true,

    /**
     * Session Save Handler DI Alias
     *
     * Please specify the DI alias for the configured AuthSessionSaveHandler
     * instance that this module should use.
     * Default is AuthSessionSaveHandler which is provided by this module.
     * This class should implement Zend\Session\SaveHandler\SaveHandlerInterface
     * Note that, if above is false, this will be useless
     */
    //'saveHandler' => 'AuthSessionSaveHandler'
);

Note: Dont forget to import schema available in data/mysql.sql to use session_set_save_handler

Session Validators

You can set validators provided by Zend Framework 2 with ease. Change the following as you wish in the config file:

$session_settings = array(
    /**
     * Session Validators
     *
     * Session validators provide various protection against session hijacking.
     * see http://framework.zend.com/manual/2.2/en/modules/zend.session.validator.html for more details
     */
    'validators' => array(
            'Zend\Session\Validator\RemoteAddr',
            'Zend\Session\Validator\HttpUserAgent',    
    ),
);

Ending Thoughts

Dont forget to fork this module and send me pull request to make this module even better!


All versions of auth with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.3
zendframework/zendframework Version 2.*
zf-commons/zfc-user Version >=0.1,<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 ujjwal/auth contains the following files

Loading the files please wait ....