public static function register($controller, $params)
{
$authUser = $params['login'];
$authPassword = $params['password'];
$realm = Arrays::getValue($params, 'realm', 'Ouzo Auth');
$controller->before[] = function () use($authUser, $authPassword, $realm) {
return AuthBasicExtension::_checkCredentials($authUser, $authPassword, $realm);
};
}