File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change
1
+ .DS_Store
Original file line number Diff line number Diff line change @@ -213,17 +213,20 @@ exception in ``refreshUser()``.
213
213
Handling Authentication Failure
214
214
-------------------------------
215
215
216
- In order for your ``ApiKeyAuthentication `` to correctly display a 403
217
- http status when either bad credentials, or authentication fails - you will
218
- need to implement the `` AuthenticationFailureHandlerInterface ` ` on your
216
+ In order for you're ``ApiKeyAuthentication `` to correctly display a 403
217
+ http status when either bad credentials or authentication fails you will
218
+ need to implement the :class: ` Symfony \C omponent \S ecurity \H ttp \A uthentication \ A uthenticationFailureHandlerInterface ` on your
219
219
Authenticator. This will provide a method ``onAuthenticationFailure `` which
220
- you can then return a ``Response `` with .
220
+ you can use to create an error ``Response ``.
221
221
222
222
// src/Acme/HelloBundle/Security/ApiKeyAuthenticator.php
223
223
namespace Acme\H elloBundle\S ecurity;
224
224
225
+ use Symfony\C omponent\S ecurity\C ore\A uthentication\S implePreAuthenticatorInterface;
226
+ use Symfony\C omponent\S ecurity\C ore\E xception\A uthenticationException;
225
227
use Symfony\C omponent\S ecurity\H ttp\A uthentication\A uthenticationFailureHandlerInterface;
226
228
use Symfony\C omponent\H ttpFoundation\R esponse;
229
+ use Symfony\C omponent\H ttpFoundation\R equest;
227
230
228
231
class ApiKeyAuthenticator implements SimplePreAuthenticatorInterface, AuthenticationFailureHandlerInterface
229
232
{
You can’t perform that action at this time.
0 commit comments