Controller/Plugin/Auth.php

Show: inherited
Table of Contents

\Conjoon_Controller_Plugin_Auth

Package: Conjoon\Controller\Plugin

A plugin that checks if a user is currently logged in before a dispatch is being made.

If the user is not logged in, the plugin will alter teh request to redirect to the login process. The plugin does also take the current format of the request being made into account.

Parent(s)
\Zend_Controller_Plugin_Abstract
Author
Thorsten Suckow-Homberg  
Category
Plugins  
Uses
\Zend_Controller_Plugin_Abstract  

Properties

Propertyprivate\Zend_Auth  $auth= ''

Details
Type
\Zend_Auth

Methods

methodpublic__construct( \Zend_Auth $auth ) : void

Constructor.

Parameters
Name Type Description
$auth \Zend_Auth

The authentication-object to use for authentication checks

methodpublicdispatchLoopStartup( \Zend_Controller_Request_Abstract $request ) : void

Called before teh disptach loop gets processed.

This callback allows for proxy or filter behavior. By altering the request and resetting its dispatched flag (via {@link Zend_Controller_Request_Abstract::setDispatched() setDispatched(false)}), the current action may be skipped.

The method checks for an authenticated user. It does also compare the authToken property of teh user with the auth_token field in the db - if the authToken is set in the db and does not equal to the authToken in the session, then it is assumed that another user has signed in with the same credentials, and the user's current session will be invalidated.

Parameters
Name Type Description
$request \Zend_Controller_Request_Abstract
Documentation was generated by DocBlox 0.18.1.