1 | <?php |
||
13 | class AuthenticationController extends AbstractController |
||
14 | { |
||
15 | use ThrottlesLogins; |
||
16 | |||
17 | /** |
||
18 | * {@inheritdoc} |
||
19 | */ |
||
20 | protected $middlewareWhitelist = [ |
||
21 | 'logout', |
||
22 | ]; |
||
23 | |||
24 | /** |
||
25 | * Create a new authentication controller instance. |
||
26 | */ |
||
27 | public function __construct() |
||
33 | |||
34 | /** |
||
35 | * Show the login form. |
||
36 | * |
||
37 | * @return \Illuminate\View\View |
||
38 | */ |
||
39 | public function form() |
||
46 | |||
47 | /** |
||
48 | * Process to the login form. |
||
49 | * |
||
50 | * @param \Cortex\Auth\Http\Requests\Frontarea\AuthenticationRequest $request |
||
51 | * |
||
52 | * @return \Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse |
||
53 | */ |
||
54 | public function login(AuthenticationRequest $request) |
||
84 | |||
85 | /** |
||
86 | * Logout currently logged in user. |
||
87 | * |
||
88 | * @param \Illuminate\Http\Request $request |
||
89 | * |
||
90 | * @return \Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse |
||
91 | */ |
||
92 | public function logout(Request $request) |
||
101 | |||
102 | /** |
||
103 | * Send the response after the user was authenticated. |
||
104 | * |
||
105 | * @param \Illuminate\Http\Request $request |
||
106 | * |
||
107 | * @return \Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse |
||
108 | */ |
||
109 | protected function sendLoginResponse(Request $request) |
||
141 | |||
142 | /** |
||
143 | * Get the failed login response instance. |
||
144 | * |
||
145 | * @param \Illuminate\Http\Request $request |
||
146 | * |
||
147 | * @throws ValidationException |
||
148 | * |
||
149 | * @return \Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse |
||
150 | */ |
||
151 | protected function sendFailedLoginResponse(Request $request) |
||
157 | |||
158 | /** |
||
159 | * Redirect the user after determining they are locked out. |
||
160 | * |
||
161 | * @param \Illuminate\Http\Request $request |
||
162 | * |
||
163 | * @throws \Illuminate\Validation\ValidationException |
||
164 | * |
||
165 | * @return \Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse |
||
166 | */ |
||
167 | protected function sendLockoutResponse(Request $request) |
||
177 | |||
178 | /** |
||
179 | * Process logout. |
||
180 | * |
||
181 | * @param \Illuminate\Http\Request $request |
||
182 | * |
||
183 | * @return void |
||
184 | */ |
||
185 | protected function processLogout(Request $request): void |
||
191 | |||
192 | /** |
||
193 | * Get the login username to be used by the controller. |
||
194 | * |
||
195 | * @return string |
||
196 | */ |
||
197 | protected function username() |
||
201 | } |
||
202 |
This check looks at variables that are passed out again to other methods.
If the outgoing method call has stricter type requirements than the method itself, an issue is raised.
An additional type check may prevent trouble.