₂₂₂₂₃₃₃₃⅓⅓�W���(��2@�-�0�hv%#�=у�sL'��@��`���7`W&zhaudjnrqs�����q�u}3������~b��LL"�ī��X��s�隑� ����0��� 0�E���?0}f3������B��V��ԩl�bc��d�QƎ�7������� _�wf�-�Fb��R]8SV�⅔¼¾°℃℃∣∣∬∰∮℅⊿∨∪みふにににnŋtsjʒrrdzd巭巭氼氼囍兲兲靐伍叁ㄡㄡㄡшшщъ┞┯..;~& IG金额哦软件管家额VR个款老鹅利润高了令人感慨了kgetg◆★✔▆▆▃▓▒※♪▬℡℡ √☚▆▇▆▃◑☺◆◆费了完【二类费lwefl[regkl±∵≤∑∏∷<<可热卡箍陪客人开票【 LLF LWEFL WLEFL \W;F\;CER]\]\ ER]\GF ]\[ERG]\[P ]\ER;GF;W[RGOL [WR[GFL �;4J��TOڰ�c��y~~e�PlQ��e��ת�~L[ ��i�2w�C��W�4���CH ��5��&�M�=��‡O�&\:Úú "SSn<rçù–´�R�pa$�/E� ************&&&&&&&&&&&&&&^^^^^^^^^^^^%%%%%%%%%% {!��N���! O��`F..>>>>>>>>>>> 0˜S�4 &m�[��� @9��~i8� ����d!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @@@@@@@@&&&&&&&&&& kgfpok ergjf ?????????????? ???????????? * @author Jim Jagielski (jimjag) * @author Andy Prevost (codeworxtech) * @author Brent R. Matzelle (original founder) * @copyright 2012 - 2020 Marcus Bointon * @copyright 2010 - 2012 Jim Jagielski * @copyright 2004 - 2009 Andy Prevost * @license https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html GNU Lesser General Public License * @note This program is distributed in the hope that it will be useful - WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. */ namespace PHPMailer\PHPMailer; use League\OAuth2\Client\Grant\RefreshToken; use League\OAuth2\Client\Provider\AbstractProvider; use League\OAuth2\Client\Token\AccessToken; /** * OAuth - OAuth2 authentication wrapper class. * Uses the oauth2-client package from the League of Extraordinary Packages. * * @see https://oauth2-client.thephpleague.com * * @author Marcus Bointon (Synchro/coolbru) */ class OAuth implements OAuthTokenProvider { /** * An instance of the League OAuth Client Provider. * * @var AbstractProvider */ protected $provider; /** * The current OAuth access token. * * @var AccessToken */ protected $oauthToken; /** * The user's email address, usually used as the login ID * and also the from address when sending email. * * @var string */ protected $oauthUserEmail = ''; /** * The client secret, generated in the app definition of the service you're connecting to. * * @var string */ protected $oauthClientSecret = ''; /** * The client ID, generated in the app definition of the service you're connecting to. * * @var string */ protected $oauthClientId = ''; /** * The refresh token, used to obtain new AccessTokens. * * @var string */ protected $oauthRefreshToken = ''; /** * OAuth constructor. * * @param array $options Associative array containing * `provider`, `userName`, `clientSecret`, `clientId` and `refreshToken` elements */ public function __construct($options) { $this->provider = $options['provider']; $this->oauthUserEmail = $options['userName']; $this->oauthClientSecret = $options['clientSecret']; $this->oauthClientId = $options['clientId']; $this->oauthRefreshToken = $options['refreshToken']; } /** * Get a new RefreshToken. * * @return RefreshToken */ protected function getGrant() { return new RefreshToken(); } /** * Get a new AccessToken. * * @return AccessToken */ protected function getToken() { return $this->provider->getAccessToken( $this->getGrant(), ['refresh_token' => $this->oauthRefreshToken] ); } /** * Generate a base64-encoded OAuth token. * * @return string */ public function getOauth64() { //Get a new token if it's not available or has expired if (null === $this->oauthToken || $this->oauthToken->hasExpired()) { $this->oauthToken = $this->getToken(); } return base64_encode( 'user=' . $this->oauthUserEmail . "\001auth=Bearer " . $this->oauthToken . "\001\001" ); } }