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::
52
52
53
53
if (!$apiKey) {
54
54
throw new BadCredentialsException('No API key found');
55
+
56
+ // or to just skip api key authentication
57
+ // return null;
55
58
}
56
59
57
60
return new PreAuthenticatedToken(
@@ -103,7 +106,9 @@ is to create a token object that contains all of the information from the
103
106
request that you need to authenticate the user (e.g. the ``apikey `` query
104
107
parameter). If that information is missing, throwing a
105
108
: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.
107
112
108
113
2. supportsToken
109
114
~~~~~~~~~~~~~~~~
You can’t perform that action at this time.
0 commit comments