Commit 26e89cc
committed
minor #20090 [Security] Authenticator methods description (smnandre)
This PR was submitted for the 7.1 branch but it was squashed and merged into the 6.4 branch instead.
Discussion
----------
[Security] Authenticator methods description
At first i just wanted to reword this sentence i found missleading.. in the [Custom Authenticator](https://symfony.com/doc/current/security/custom_authenticator.html) page.
> If ``null`` is returned, the request continues like normal (i.e. the controller matching the login route is called).
I think it should be:
```diff
- (i.e. the controller matching the login route is called)
+ (i.e. the controller matching the current route is called)
```
Because it _can_ be the login route for _some_ Authenticators, but it's not for stateless requests, Header tokens, remember me...
I then realize the "if / if" was the reason I found things a bit unclear at first sight.
```
onAuthenticationSuccess(Request $request, ...)
If the user is authenticated, (...)
If ``null`` is returned, (...)
```
I read this as some sort of "if / else" ... but the first "if" englobes the whole paragraph (it's true again in the second one).
So i tried to rewrite a bit (using the docblocks from the [AuthenticatorInterface](https://github.com/symfony/symfony/blob/7.2/src/Symfony/Component/Security/Http/Authenticator/AuthenticatorInterface.php) as inspiration)
Commits
-------
236e419 [Security] Authenticator methods description1 file changed
+15
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
156 | | - | |
157 | | - | |
158 | | - | |
| 156 | + | |
| 157 | + | |
159 | 158 | | |
160 | | - | |
161 | | - | |
162 | | - | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
163 | 164 | | |
164 | 165 | | |
165 | | - | |
166 | | - | |
167 | | - | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
168 | 171 | | |
169 | | - | |
170 | | - | |
171 | | - | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
172 | 175 | | |
173 | 176 | | |
174 | 177 | | |
| |||
0 commit comments