File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,9 @@ value and then a User object is created::
5252
5353 if (!$apiKey) {
5454 throw new BadCredentialsException('No API key found');
55+
56+ // or to just skip api key authentication
57+ // return null;
5558 }
5659
5760 return new PreAuthenticatedToken(
@@ -103,7 +106,9 @@ is to create a token object that contains all of the information from the
103106request that you need to authenticate the user (e.g. the ``apikey `` query
104107parameter). If that information is missing, throwing a
105108:class: `Symfony\\ Component\\ Security\\ Core\\ Exception\\ BadCredentialsException `
106- will cause authentication to fail.
109+ will cause authentication to fail. You might want to return ``null `` instead
110+ to just skip the authentication, so Symfony can fallback to another authentication
111+ method, if any.
107112
1081132. supportsToken
109114~~~~~~~~~~~~~~~~
You can’t perform that action at this time.
0 commit comments