1 | <?php |
||
24 | class AuthenticationHandlerEvent extends Event |
||
25 | { |
||
26 | /** |
||
27 | * The event name that happens after the default authentication success handler is called. |
||
28 | */ |
||
29 | const SUCCESS = 'ldap_tools_bundle.guard.login.success'; |
||
30 | |||
31 | /** |
||
32 | * The event name that happens after the default authentication failure handler is called. |
||
33 | */ |
||
34 | const FAILURE = 'ldap_tools_bundle.guard.login.failure'; |
||
35 | |||
36 | /** |
||
37 | * The event name that happens when the entry point is called for the guard and returns a redirect/response. |
||
38 | */ |
||
39 | const START = 'ldap_tools_bundle.guard.login.start'; |
||
40 | |||
41 | /** |
||
42 | * @var Response |
||
43 | */ |
||
44 | protected $response; |
||
45 | |||
46 | /** |
||
47 | * @var AuthenticationException|null |
||
48 | */ |
||
49 | protected $exception; |
||
50 | |||
51 | /** |
||
52 | * @var Request |
||
53 | */ |
||
54 | protected $request; |
||
55 | |||
56 | /** |
||
57 | * @var TokenInterface|null |
||
58 | */ |
||
59 | protected $token; |
||
60 | |||
61 | /** |
||
62 | * @var string|null |
||
63 | */ |
||
64 | protected $providerKey; |
||
65 | |||
66 | /** |
||
67 | * @param Response $response |
||
68 | * @param Request $request |
||
69 | * @param null|AuthenticationException $exception |
||
70 | * @param TokenInterface|null $token |
||
71 | * @param string|null $providerKey |
||
72 | */ |
||
73 | public function __construct(Response $response, Request $request, AuthenticationException $exception = null, TokenInterface $token = null, $providerKey = null) |
||
|
|||
74 | { |
||
75 | $this->request = $request; |
||
76 | $this->response = $response; |
||
77 | $this->exception = $exception; |
||
78 | $this->token = $token; |
||
79 | $this->providerKey = $providerKey; |
||
80 | } |
||
81 | |||
82 | /** |
||
83 | * @return Response |
||
84 | */ |
||
85 | public function getResponse() |
||
89 | |||
90 | /** |
||
91 | * @return Request |
||
92 | */ |
||
93 | public function getRequest() |
||
97 | |||
98 | /** |
||
99 | * @param Response $response |
||
100 | * @return $this |
||
101 | */ |
||
102 | public function setResponse(Response $response) |
||
108 | |||
109 | /** |
||
110 | * @return AuthenticationException|null |
||
111 | */ |
||
112 | public function getException() |
||
116 | |||
117 | /** |
||
118 | * @return null|TokenInterface |
||
119 | */ |
||
120 | public function getToken() |
||
124 | |||
125 | /** |
||
126 | * @return null|string |
||
127 | */ |
||
128 | public function getProviderKey() |
||
132 | } |
||
133 |