1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <?php
- namespace Symfony\Component\Security\Http\Authentication;
- use Symfony\Component\HttpFoundation\Request;
- use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
- class CustomAuthenticationSuccessHandler implements AuthenticationSuccessHandlerInterface
- {
- private $handler;
-
- public function __construct(AuthenticationSuccessHandlerInterface $handler, array $options, $providerKey)
- {
- $this->handler = $handler;
- if (method_exists($handler, 'setOptions')) {
- $this->handler->setOptions($options);
- }
- if (method_exists($handler, 'setProviderKey')) {
- $this->handler->setProviderKey($providerKey);
- }
- }
-
- public function onAuthenticationSuccess(Request $request, TokenInterface $token)
- {
- return $this->handler->onAuthenticationSuccess($request, $token);
- }
- }
|