1 | <?php |
||
23 | class AuthenticationHandlerEvent extends Event |
||
24 | { |
||
25 | /** |
||
26 | * The event name that happens after the default authentication success handler is called. |
||
27 | */ |
||
28 | const SUCCESS = 'ldap_tools_bundle.guard.login.success'; |
||
29 | |||
30 | /** |
||
31 | * The event name that happens after the default authentication failure handler is called. |
||
32 | */ |
||
33 | const FAILURE = 'ldap_tools_bundle.guard.login.failure'; |
||
34 | |||
35 | /** |
||
36 | * @var Response |
||
37 | */ |
||
38 | protected $response; |
||
39 | |||
40 | /** |
||
41 | * @var \Exception|null |
||
42 | */ |
||
43 | protected $exception; |
||
44 | |||
45 | /** |
||
46 | * @var Request |
||
47 | */ |
||
48 | protected $request; |
||
49 | |||
50 | /** |
||
51 | * @var TokenInterface|null |
||
52 | */ |
||
53 | protected $token; |
||
54 | |||
55 | /** |
||
56 | * @var string|null |
||
57 | */ |
||
58 | protected $providerKey; |
||
59 | |||
60 | /** |
||
61 | * @param Response $response |
||
62 | * @param Request $request |
||
63 | * @param \Exception|null $exception |
||
64 | * @param TokenInterface|null $token |
||
65 | * @param string|null $providerKey |
||
66 | */ |
||
67 | public function __construct(Response $response, Request $request, \Exception $exception = null, TokenInterface $token = null, $providerKey = null) |
||
75 | |||
76 | /** |
||
77 | * @return Response |
||
78 | */ |
||
79 | public function getResponse() |
||
83 | |||
84 | /** |
||
85 | * @return Request |
||
86 | */ |
||
87 | public function getRequest() |
||
91 | |||
92 | /** |
||
93 | * @param Response $response |
||
94 | * @return $this |
||
95 | */ |
||
96 | public function setResponse(Response $response) |
||
102 | |||
103 | /** |
||
104 | * @return \Exception|null |
||
105 | */ |
||
106 | public function getException() |
||
110 | |||
111 | /** |
||
112 | * @return null|TokenInterface |
||
113 | */ |
||
114 | public function getToken() |
||
118 | |||
119 | /** |
||
120 | * @return null|string |
||
121 | */ |
||
122 | public function getProviderKey() |
||
126 | } |
||
127 |