ユーザーがログインしたら、デフォルトの有効期間を延長しようとしています。ログインには、次のようにセキュリティサービスプロバイダーを使用しています。
$app = $this->_app;
$this->_app->register(new Silex\Provider\SecurityServiceProvider(), array(
'security.firewalls' => array(
'default' => array(
'pattern' => '^.*$',
'anonymous' => true, // Needed as the login path is under the secured area
'form' => array('login_path' => '/signup/', 'check_path' => 'login_check', 'failure_path' => 'login_failure'),
'logout' => array('logout_path' => '/logout/'), // url to call for logging out
'users' => $this->_app->share(function() use ($app)
{
// Specific class App\User\UserProvider is described below
return new UserProvider($app['db']);
}),
),
),
'security.access_rules' => array(
array('^/restricted/$', 'ROLE_USER'),
)
));
私は次のようにセッションの有効期間(Cookie)を設定してみました:
$this->_app->register(new Silex\Provider\SessionServiceProvider(), array(
'session.storage.options' => array('cookie_lifetime' => (60 * 60 * 12)), // 12 hours
));
しかし、それでも何もありません。セッションは15分ほどで自動的に削除されます。
ログインセキュリティファイアウォールの有効期間を12時間に延長するにはどうすればよいですか?