Silex Security success_handler
Как я могу установить success_handler (и fault_handler) для поставщика проверки подлинности формы?
Silex игнорирует меня с этим конфигом:
register(new Silex\Provider\SecurityServiceProvider(), array(
'security.firewalls' => array(
'dev' => array(
'pattern' => '^/(_(profiler|wdt)|css|images|js)/',
'security' => false
),
'default' => array(
'pattern' => '^/.*И это мой обычай (никогда не вызывается)
$app['authentication_handler'] = $app->share(function ($app) {
return new \WebFactory\Security\AuthenticationHandler($app['url_generator']);
});
Это ошибка?
,
'anonymous' => true,
'form' => array(
'login_path' => '/login',
'check_path' => '/login_check',
'success_handler' => 'authentication_handler', // 'authentication_handler', // array('logout_path' => '/logout'),
'users' => $app->share(function () use ($app) {
return new UserProvider($app['db']);
}),
),
),
'security.access_rules' => array(
array('^/login', 'IS_AUTHENTICATED_ANONYMOUSLY'),
array('^/privateИ это мой обычай (никогда не вызывается)
$app['authentication_handler'] = $app->share(function ($app) {
return new \WebFactory\Security\AuthenticationHandler($app['url_generator']);
});
Это ошибка?
, 'ROLE_ADMIN'),
),
'security.role_hierarchy' => array(
'ROLE_SIMPLE_USER' => array('ROLE_USER'),
'ROLE_ASSOCIATE' => array('ROLE_USER'),
)
));
И это мой обычай (никогда не вызывается)
$app['authentication_handler'] = $app->share(function ($app) {
return new \WebFactory\Security\AuthenticationHandler($app['url_generator']);
});
Это ошибка?