Copybara bot | be50d49 | 2023-11-30 00:16:42 +0100 | [diff] [blame] | 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 | } |