src/Security/ApiAuthenticator.php line 21

Open in your IDE?
  1. <?php
  2. namespace App\Security;
  3. use Symfony\Component\HttpFoundation\Request;
  4. use Symfony\Component\HttpFoundation\Response;
  5. use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
  6. use Symfony\Component\Security\Core\Exception\AuthenticationException;
  7. use Symfony\Component\Security\Core\User\UserInterface;
  8. use Symfony\Component\Security\Core\User\UserProviderInterface;
  9. use Symfony\Component\Security\Guard\Token\GuardTokenInterface;
  10. class ApiAuthenticator implements \Symfony\Component\Security\Guard\AuthenticatorInterface
  11. {
  12. /**
  13. * @inheritDoc
  14. */
  15. public function start(Request $request, AuthenticationException $authException = null)
  16. {
  17. return new Response('', Response::HTTP_UNAUTHORIZED);
  18. }
  19. /**
  20. * @inheritDoc
  21. */
  22. public function supports(Request $request)
  23. {
  24. return false;
  25. }
  26. /**
  27. * @inheritDoc
  28. */
  29. public function getCredentials(Request $request)
  30. {
  31. // TODO: Implement getCredentials() method.
  32. }
  33. /**
  34. * @inheritDoc
  35. */
  36. public function getUser($credentials, UserProviderInterface $userProvider)
  37. {
  38. // TODO: Implement getUser() method.
  39. }
  40. /**
  41. * @inheritDoc
  42. */
  43. public function checkCredentials($credentials, UserInterface $user)
  44. {
  45. // TODO: Implement checkCredentials() method.
  46. }
  47. /**
  48. * @inheritDoc
  49. */
  50. public function createAuthenticatedToken(UserInterface $user, $providerKey)
  51. {
  52. // TODO: Implement createAuthenticatedToken() method.
  53. }
  54. /**
  55. * @inheritDoc
  56. */
  57. public function onAuthenticationFailure(Request $request, AuthenticationException $exception)
  58. {
  59. // TODO: Implement onAuthenticationFailure() method.
  60. }
  61. /**
  62. * @inheritDoc
  63. */
  64. public function onAuthenticationSuccess(Request $request, TokenInterface $token, $providerKey)
  65. {
  66. // TODO: Implement onAuthenticationSuccess() method.
  67. }
  68. /**
  69. * @inheritDoc
  70. */
  71. public function supportsRememberMe()
  72. {
  73. // TODO: Implement supportsRememberMe() method.
  74. }
  75. }