File tree Expand file tree Collapse file tree 3 files changed +13
-8
lines changed Expand file tree Collapse file tree 3 files changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -29,16 +29,15 @@ public function checkPreAuth(UserInterface $user): void
29
29
}
30
30
}
31
31
32
- public function checkPostAuth (UserInterface $ user /* , TokenInterface $token */ ): void
32
+ /**
33
+ * @param ?TokenInterface $token
34
+ */
35
+ public function checkPostAuth (UserInterface $ user /* , ?TokenInterface $token = null */ ): void
33
36
{
34
37
$ token = 1 < \func_num_args () ? func_get_arg (1 ) : null ;
35
38
36
39
foreach ($ this ->checkers as $ checker ) {
37
- if ($ token instanceof TokenInterface) {
38
- $ checker ->checkPostAuth ($ user , $ token );
39
- } else {
40
- $ checker ->checkPostAuth ($ user );
41
- }
40
+ $ checker ->checkPostAuth ($ user , $ token );
42
41
}
43
42
}
44
43
}
Original file line number Diff line number Diff line change @@ -33,7 +33,10 @@ public function checkPreAuth(UserInterface $user): void
33
33
}
34
34
}
35
35
36
- public function checkPostAuth (UserInterface $ user ): void
36
+ /**
37
+ * @param ?TokenInterface $token
38
+ */
39
+ public function checkPostAuth (UserInterface $ user /* , ?TokenInterface $token = null */ ): void
37
40
{
38
41
}
39
42
}
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 ;
14
15
use Symfony \Component \Security \Core \Exception \AccountStatusException ;
15
16
16
17
/**
@@ -33,7 +34,9 @@ public function checkPreAuth(UserInterface $user): void;
33
34
/**
34
35
* Checks the user account after authentication.
35
36
*
37
+ * @param ?TokenInterface $token
38
+ *
36
39
* @throws AccountStatusException
37
40
*/
38
- public function checkPostAuth (UserInterface $ user /* , TokenInterface $token */ ): void ;
41
+ public function checkPostAuth (UserInterface $ user /* , ? TokenInterface $token = null */ ): void ;
39
42
}
You can’t perform that action at this time.
0 commit comments