Skip to content

Commit 81dd5e7

Browse files
gondowouterj
authored andcommitted
removed message from BadCredentialsException
removed message from BadCredentialsException as defining custom message is confusing, because `onAuthenticationFailure` is using `getMessageKey()` instead of `getMessage()`
1 parent dbd8bb9 commit 81dd5e7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cookbook/security/api_key_authentication.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ value and then a User object is created::
4141
// $apiKey = $request->headers->get('apikey');
4242

4343
if (!$apiKey) {
44-
throw new BadCredentialsException('No API key found');
44+
throw new BadCredentialsException();
4545

4646
// or to just skip api key authentication
4747
// return null;

0 commit comments

Comments
 (0)