File tree 2 files changed +15
-12
lines changed
src/Symfony/Component/Security/Http
2 files changed +15
-12
lines changed Original file line number Diff line number Diff line change @@ -108,12 +108,13 @@ public function supports(Request $request): ?bool
108
108
}
109
109
}
110
110
111
+ $ request ->attributes ->set ('_security_skipped_authenticators ' , $ skippedAuthenticators );
112
+
111
113
if (!$ authenticators ) {
112
114
return false ;
113
115
}
114
116
115
117
$ request ->attributes ->set ('_security_authenticators ' , $ authenticators );
116
- $ request ->attributes ->set ('_security_skipped_authenticators ' , $ skippedAuthenticators );
117
118
118
119
return $ lazy ? null : true ;
119
120
}
Original file line number Diff line number Diff line change @@ -36,16 +36,7 @@ public function __construct(
36
36
37
37
public function supports (Request $ request ): ?bool
38
38
{
39
- return $ this ->authenticationManagerListener ->supports ($ request );
40
- }
41
-
42
- public function authenticate (RequestEvent $ event ): void
43
- {
44
- $ request = $ event ->getRequest ();
45
-
46
- if (!$ authenticators = $ request ->attributes ->get ('_security_authenticators ' )) {
47
- return ;
48
- }
39
+ $ supports = $ this ->authenticationManagerListener ->supports ($ request );
49
40
50
41
foreach ($ request ->attributes ->get ('_security_skipped_authenticators ' ) as $ skippedAuthenticator ) {
51
42
$ this ->authenticatorsInfo [] = [
@@ -58,7 +49,18 @@ public function authenticate(RequestEvent $event): void
58
49
];
59
50
}
60
51
61
- foreach ($ authenticators as $ key => $ authenticator ) {
52
+ return $ supports ;
53
+ }
54
+
55
+ public function authenticate (RequestEvent $ event ): void
56
+ {
57
+ $ request = $ event ->getRequest ();
58
+
59
+ if (!$ authenticators = $ request ->attributes ->get ('_security_authenticators ' )) {
60
+ return ;
61
+ }
62
+
63
+ foreach ($ request ->attributes ->get ('_security_authenticators ' ) as $ key => $ authenticator ) {
62
64
$ authenticators [$ key ] = new TraceableAuthenticator ($ authenticator );
63
65
}
64
66
You can’t perform that action at this time.
0 commit comments