\AclUser\ServiceAuthManager

The AuthManager service is responsible for user's login/logout and simple access filtering. The access filtering feature checks whether the current visitor is allowed to see the given page or not.

Summary

Methods
Properties
Constants
__construct()
login()
loginUser()
logout()
validateLoginForm()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$sessionManager
$authService
N/A

Properties

$sessionManager

$sessionManager : \AclUser\Service\Zend\Session\SessionManager

Session manager.

Type

\AclUser\Service\Zend\Session\SessionManager

$authService

$authService : \Zend\Authentication\AuthenticationService

Zend authentication service that handles session management for authorised users and can be used for authentication of users

Type

\Zend\Authentication\AuthenticationService

Methods

__construct()

__construct(\Zend\Authentication\AuthenticationService  $authService, \AclUser\Service\Zend\Session\SessionManager  $sessionManager) 

Constructs the service.

Parameters

\Zend\Authentication\AuthenticationService $authService
\AclUser\Service\Zend\Session\SessionManager $sessionManager

login()

login(string  $email, string  $password, boolean  $rememberMe = false) : \AclUser\Service\Zend\Authentication\Result

Performs a login attempt. If $rememberMe argument is true, it forces the session to last for one month (otherwise the session expires on one hour).

Parameters

string $email
string $password
boolean $rememberMe

Throws

\Exception

Returns

\AclUser\Service\Zend\Authentication\Result —

object that carries message and boolean success

loginUser()

loginUser(\AclUser\Entity\User  $user) 

Login user after we are sure there is one

Parameters

\AclUser\Entity\User $user

logout()

logout() 

Performs user logout.

validateLoginForm()

validateLoginForm(\AclUser\Service\AclUser\Form\LoginForm  $form, array  $params) : \AclUser\Service\Zend\Authentication\Result

Validate login form and assign values to result object

Parameters

\AclUser\Service\AclUser\Form\LoginForm $form
array $params

Returns

\AclUser\Service\Zend\Authentication\Result