Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.2.x will end 22 April 2024 (12 months).
  • Bug fixes for security issues in 4.2.x will end 7 October 2024 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.x is supported too.
   1  <?php
   2  
   3  /**
   4   * PHPMailer - PHP email creation and transport class.
   5   * PHP Version 5.5.
   6   *
   7   * @see https://github.com/PHPMailer/PHPMailer/ The PHPMailer GitHub project
   8   *
   9   * @author    Marcus Bointon (Synchro/coolbru) <phpmailer@synchromedia.co.uk>
  10   * @author    Jim Jagielski (jimjag) <jimjag@gmail.com>
  11   * @author    Andy Prevost (codeworxtech) <codeworxtech@users.sourceforge.net>
  12   * @author    Brent R. Matzelle (original founder)
  13   * @copyright 2012 - 2020 Marcus Bointon
  14   * @copyright 2010 - 2012 Jim Jagielski
  15   * @copyright 2004 - 2009 Andy Prevost
  16   * @license   http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
  17   * @note      This program is distributed in the hope that it will be useful - WITHOUT
  18   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  19   * FITNESS FOR A PARTICULAR PURPOSE.
  20   */
  21  
  22  namespace PHPMailer\PHPMailer;
  23  
  24  /**
  25   * OAuthTokenProvider - OAuth2 token provider interface.
  26   * Provides base64 encoded OAuth2 auth strings for SMTP authentication.
  27   *
  28   * @see     OAuth
  29   * @see     SMTP::authenticate()
  30   *
  31   * @author  Peter Scopes (pdscopes)
  32   * @author  Marcus Bointon (Synchro/coolbru) <phpmailer@synchromedia.co.uk>
  33   */
  34  interface OAuthTokenProvider
  35  {
  36      /**
  37       * Generate a base64-encoded OAuth token ensuring that the access token has not expired.
  38       * The string to be base 64 encoded should be in the form:
  39       * "user=<user_email_address>\001auth=Bearer <access_token>\001\001"
  40       *
  41       * @return string
  42       */
  43      public function getOauth64();
  44  }