File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
src/Symfony/Component/Security/Http/Firewall Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 19
19
use Symfony \Component \HttpFoundation \Response ;
20
20
use Symfony \Component \Security \Core \Authentication \SimplePreAuthenticatorInterface ;
21
21
use Symfony \Component \Security \Core \Authentication \Token \TokenInterface ;
22
+ use Symfony \Component \Security \Core \Authentication \Token \AnonymousToken ;
22
23
use Symfony \Component \Security \Core \Exception \AuthenticationException ;
23
24
use Symfony \Component \Security \Http \Authentication \AuthenticationFailureHandlerInterface ;
24
25
use Symfony \Component \Security \Http \Authentication \AuthenticationSuccessHandlerInterface ;
@@ -71,6 +72,10 @@ public function handle(GetResponseEvent $event)
71
72
$ this ->logger ->info (sprintf ('Attempting simple pre-authorization %s ' , $ this ->providerKey ));
72
73
}
73
74
75
+ if (null !== $ this ->context ->getToken () && !$ this ->context ->getToken () instanceof AnonymousToken) {
76
+ return ;
77
+ }
78
+
74
79
try {
75
80
$ token = $ this ->simpleAuthenticator ->createToken ($ request , $ this ->providerKey );
76
81
$ token = $ this ->authenticationManager ->authenticate ($ token );
You can’t perform that action at this time.
0 commit comments