次のシナリオで問題があります:
私の Symfony2 アプリケーションでは、ログインしているユーザーがサードパーティのアプリケーション (TinyMCE のファイルネームャー) を開きます。SF2 アプリケーションからの資格情報でユーザーを承認する方法は?
remember_me
ユーザーがログインページをチェックすると、これは機能します:
//Bootstrap of 3rd party app
require_once('../../../app/bootstrap.php.cache');
require_once('../../../app/AppKernel.php');
$kernel = new AppKernel('prod', false);
$request = \Symfony\Component\HttpFoundation\Request::createFromGlobals();
$container = $kernel->getContainer();
if(false == $container->get('security.context')->isGranted('ROLE_USER'))
{
$response = new \Symfony\Component\HttpFoundation\RedirectResponse('http://'.$request->getHost());
return $response->send();
}
しかし、でログインしていない場合remember_me
、ログイン ページにリダイレクトされます。