【发布时间】:2012-01-04 20:00:31
【问题描述】:
这个问题涉及到
How to disable redirection after login_check in Symfony 2
我已经完全实现了该链接中给出的解决方案,但收到了一个我通常理解的错误,但在这种情况下没有。我的班级绝对完美地实现了接口(我认为)。
致命错误:Foo\AppBundle\Handler\AuthenticationHandler::onAuthenticationSuccess() 的声明必须与 /Users/Me/Sites/ 中 Symfony\Component\Security\Http\Authentication\AuthenticationSuccessHandlerInterface::onAuthenticationSuccess() 的声明兼容github/Foo/Symfony/src/Foo/AppBundle/Handler/AuthenticationHandler.php 在第 6 行
class AuthenticationHandler implements
\Symfony\Component\Security\Http\Authentication\AuthenticationSuccessHandlerInterface,
\Symfony\Component\Security\Http\Authentication\AuthenticationFailureHandlerInterface
{
function onAuthenticationSuccess(Request $request, TokenInterface $token) {
return new Response();
}
function onAuthenticationFailure(Request $request, AuthenticationException $exception) {
return new Response();
}
}
建议!
【问题讨论】:
标签: symfony