Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. CramMd5Authenticator.php

function CramMd5Authenticator::authenticate

Overrides AuthenticatorInterface::authenticate

See also

https://www.ietf.org/rfc/rfc4954.txt

File

vendor/symfony/mailer/Transport/Smtp/Auth/CramMd5Authenticator.php, line 32

Class

CramMd5Authenticator
Handles CRAM-MD5 authentication.

Namespace

Symfony\Component\Mailer\Transport\Smtp\Auth

Code

public function authenticate(EsmtpTransport $client) : void {
    $challenge = $client->executeCommand("AUTH CRAM-MD5\r\n", [
        334,
    ]);
    $challenge = base64_decode(substr($challenge, 4));
    $message = base64_encode($client->getUsername() . ' ' . $this->getResponse($client->getPassword(), $challenge));
    $client->executeCommand(\sprintf("%s\r\n", $message), [
        235,
    ]);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal