Skip to content
AlexFloppy edited this page Jan 27, 2015 · 11 revisions

##Description

Implemented default user's functionality such as registration, authorization, password recovery, acl (BjyAuthorize). It's also allows to manage users by grid. Module User are reguired module.

##Global settings Mail settings required for registration and password recovery.

'mail' => array(
   'transport' => array(
      'options' => array(
         'host'              => '%host%',
         'port'              => '%port%',
      ),
   ),
   'message' => array(
      'headers' => array(
         'PROJECT' => '%project%',
         'EMAILS'  => '%mail%'
      ),
      'from' => array ('admin@zfury.com')
   )
)

##ACL (BjyAuthorize) There is three existing role - guest, user, admin. It's configured in bjyauthorize.global.php

For manage permissions for each controller/action manage module.config.php of each module 'bjyauthorize' section Examples:

'bjyauthorize' => array(
   'guards' => array(
      'BjyAuthorize\Guard\Controller' => array(

         // access for all roles to Application\Controller\Index
         array(
            'controller' => 'Application\Controller\Index',
            'roles' => array(),
         ),

         // access only for admin for controller User\Controller\Management
         array(
            'controller' => 'User\Controller\Management',
            'roles' => array('admin'),
         ),

         // access only for geust to login,recover-password actions for controller User\Controller\Auth
         array(
            'controller' => 'User\Controller\Auth',
            'action' => array('login', 'recover-password'),
            'roles' => array('guest'),
         ),
      ),
   ),
),

##Authorize by twitter/facebook Implemented authorization by twitter/facebook.

'facebook' => array(
   'appId' => '%appId%',
   'appSecret' => '%appSecret%',
),
'twitter' => array(
   'siteUrl' => 'https://api.twitter.com/oauth',
   'authorizeUrl' => 'https://api.twitter.com/oauth/authenticate',
   'consumerKey' => '%consumerKey%',
   'consumerSecret' => '%consumerSecret%',
   'httpClientOptions' => array(
      'adapter' => 'Zend\Http\Client\Adapter\Curl',
      'curloptions' => array(
         CURLOPT_SSL_VERIFYHOST => false,
         CURLOPT_SSL_VERIFYPEER => false
      )
   )
)

Clone this wiki locally