重定向被记录
问题描述:
后,我不知道是否有把连propio security.yml文件,就像一个办法:重定向被记录
web:
pattern: ^/web
oauth:
resource_owners:
facebook: "/web/login/check-facebook"
google: "/web/login/check-google"
linkedin: "/web/login/check-linkedin"
login_path:/
failure_path:/
default_target_path:/
check_path: /web/login_check
同样具有login_path:/有事情login_sucess_path?
答
hwi_oauth_connect_service:
pattern: /service/{service}
defaults: { _controller: DelivveWebBundle:Default:connectService}
目前我改写了这条路线
,我有下面的方法在我的控制器
public function connectServiceAction() #(Request $request, $service)
{
$user = $this->container->get('security.context')->getToken()->getUser();
return $this->container->get('templating')->renderResponse('default/index.html.twig');
}
答
从线128开始就给出了重定向的参数登录,即后:
# login success redirecting options (read further below)
always_use_default_target_path: false
default_target_path: /
target_path_parameter: _target_path
use_referer: false
# login failure redirecting options (read further below)
failure_path: /foo
failure_forward: false
failure_path_parameter: _failure_path
failure_handler: some.service.id
success_handler: some.service.id
所以,是的,它确实有类似的东西来login_success_path
,即default_target_path
。
然后我看到了一些东西,但在我看来,它更当我使用窗体,在我的情况下,我有一个链接,我让我去控制器请求捆绑 –