PHP Class Sulu\Bundle\SecurityBundle\Security\AuthenticationHandler

Inheritance: implements Symfony\Component\Security\Http\Authentication\AuthenticationSuccessHandlerInterface, implements Symfony\Component\Security\Http\Authentication\AuthenticationFailureHandlerInterface
ファイルを表示 Open project: sulu/sulu Class Usage Examples

Public Methods

Method Description
__construct ( Symfony\Component\Routing\RouterInterface $router, Symfony\Component\HttpFoundation\Session\Session $session )
onAuthenticationFailure ( Request $request, Symfony\Component\Security\Core\Exception\AuthenticationException $exception ) : Response Handler for AuthenticationFailure. Returns a JsonResponse if request is an AJAX-request.
onAuthenticationSuccess ( Request $request, Symfony\Component\Security\Core\Authentication\Token\TokenInterface $token ) : Response Handler for AuthenticationSuccess. Returns a JsonResponse if request is an AJAX-request.

Method Details

__construct() public method

public __construct ( Symfony\Component\Routing\RouterInterface $router, Symfony\Component\HttpFoundation\Session\Session $session )
$router Symfony\Component\Routing\RouterInterface
$session Symfony\Component\HttpFoundation\Session\Session

onAuthenticationFailure() public method

Returns a Redirect-response otherwise.
public onAuthenticationFailure ( Request $request, Symfony\Component\Security\Core\Exception\AuthenticationException $exception ) : Response
$request Symfony\Component\HttpFoundation\Request
$exception Symfony\Component\Security\Core\Exception\AuthenticationException
return Symfony\Component\HttpFoundation\Response

onAuthenticationSuccess() public method

Returns a RedirectResponse otherwise.
public onAuthenticationSuccess ( Request $request, Symfony\Component\Security\Core\Authentication\Token\TokenInterface $token ) : Response
$request Symfony\Component\HttpFoundation\Request
$token Symfony\Component\Security\Core\Authentication\Token\TokenInterface
return Symfony\Component\HttpFoundation\Response