AuthenticatorInterface.php 831 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\Mailer\Transport\Smtp\Auth;
  11. use Symfony\Component\Mailer\Exception\TransportExceptionInterface;
  12. use Symfony\Component\Mailer\Transport\Smtp\EsmtpTransport;
  13. /**
  14. * An Authentication mechanism.
  15. *
  16. * @author Chris Corbyn
  17. */
  18. interface AuthenticatorInterface
  19. {
  20. /**
  21. * Tries to authenticate the user.
  22. *
  23. * @throws TransportExceptionInterface
  24. */
  25. public function authenticate(EsmtpTransport $client): void;
  26. /**
  27. * Gets the name of the AUTH mechanism this Authenticator handles.
  28. */
  29. public function getAuthKeyword(): string;
  30. }