From 4fcc154f0f3cb229d00c8d4edf13783fa160157e Mon Sep 17 00:00:00 2001 From: Thomas Landauer Date: Sun, 22 Mar 2020 14:52:30 +0100 Subject: [PATCH] Update guard_authentication.rst --- security/guard_authentication.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/security/guard_authentication.rst b/security/guard_authentication.rst index 4ccb4c3737b..f87f74b1a37 100644 --- a/security/guard_authentication.rst +++ b/security/guard_authentication.rst @@ -174,7 +174,7 @@ This requires you to implement several methods:: { /** * Called on every request to decide if this authenticator should be - * used for the request. Returning false will cause this authenticator + * used for the request. Returning `false` will cause this authenticator * to be skipped. */ public function supports(Request $request) @@ -194,7 +194,8 @@ This requires you to implement several methods:: public function getUser($credentials, UserProviderInterface $userProvider) { if (null === $credentials) { - // The token header was empty, authentication fails with 401 + // The token header was empty, authentication fails with HTTP Status + // Code 401 "Unauthorized" return null; } @@ -220,7 +221,7 @@ This requires you to implement several methods:: public function onAuthenticationFailure(Request $request, AuthenticationException $exception) { $data = [ - // you may ant to customize or obfuscate the message first + // you may want to customize or obfuscate the message first 'message' => strtr($exception->getMessageKey(), $exception->getMessageData()) // or to translate this message