There is no license information available for the latest version (1.0.0) of this package.

UserAuth module for zend framework 3

1.0.0 2018-01-21 10:02 UTC


Module for Zend Framework 3.


Installation of this module uses composer. For composer documentation, please refer to

composer require vim/user-auth

Register Vim\UserAuth in config/modules.config.php:

return [

Register Entity:


/** @var \Vim\UserAuth\Service\AuthService $authService */
$authService = $container->get(\Vim\UserAuth\Service\AuthService::class);

$authService->authenticate('', 'some_password');


//check if the user is authorized

//get authorized user identity

Get current user:

/** @var \Vim\UserAuth\Service\CurrentUserService $currentUserService */
$currentUserService = $container->get(\Vim\UserAuth\Service\CurrentUserService::class);

You can use initializer for \Vim\UserAuth\Service\CurrentUserService.

To do this, register initializer in service manager config.

return [
    'service_manager' => [
        'initializers' => [

View Helper: