File tree Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ CHANGELOG
4
4
7.2
5
5
---
6
6
7
+ * Add ` $token ` argument to ` UserCheckerInterface::checkPostAuth() `
7
8
* Deprecate argument ` $secret ` of ` RememberMeToken `
8
9
9
10
7.0
Original file line number Diff line number Diff line change 11
11
12
12
namespace Symfony \Component \Security \Core \User ;
13
13
14
+ use Symfony \Component \Security \Core \Authentication \Token \TokenInterface ;
15
+
14
16
final class ChainUserChecker implements UserCheckerInterface
15
17
{
16
18
/**
@@ -27,10 +29,16 @@ public function checkPreAuth(UserInterface $user): void
27
29
}
28
30
}
29
31
30
- public function checkPostAuth (UserInterface $ user ): void
32
+ public function checkPostAuth (UserInterface $ user /*, TokenInterface $token*/ ): void
31
33
{
34
+ $ token = 1 < \func_num_args () ? func_get_arg (1 ) : null ;
35
+
32
36
foreach ($ this ->checkers as $ checker ) {
33
- $ checker ->checkPostAuth ($ user );
37
+ if ($ token instanceof TokenInterface) {
38
+ $ checker ->checkPostAuth ($ user , $ token );
39
+ } else {
40
+ $ checker ->checkPostAuth ($ user );
41
+ }
34
42
}
35
43
}
36
44
}
Original file line number Diff line number Diff line change @@ -35,5 +35,5 @@ public function checkPreAuth(UserInterface $user): void;
35
35
*
36
36
* @throws AccountStatusException
37
37
*/
38
- public function checkPostAuth (UserInterface $ user ): void ;
38
+ public function checkPostAuth (UserInterface $ user /*, TokenInterface $token*/ ): void ;
39
39
}
You can’t perform that action at this time.
0 commit comments