Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
PHPMailer\PHPMailer\OAuth Class Reference

OAuth - OAuth2 authentication wrapper class. More...

Inheritance diagram for PHPMailer\PHPMailer\OAuth:
PHPMailer\PHPMailer\OAuthTokenProvider moodle_phpmailer_oauth

Public Member Functions

 __construct ($options)
 OAuth constructor.
 
 getOauth64 ()
 Generate a base64-encoded OAuth token.
 

Protected Member Functions

 getGrant ()
 Get a new RefreshToken.
 
 getToken ()
 Get a new AccessToken.
 

Protected Attributes

string $oauthClientId = ''
 The client ID, generated in the app definition of the service you're connecting to.
 
string $oauthClientSecret = ''
 The client secret, generated in the app definition of the service you're connecting to.
 
string $oauthRefreshToken = ''
 The refresh token, used to obtain new AccessTokens.
 
AccessToken $oauthToken
 The current OAuth access token.
 
string $oauthUserEmail = ''
 The user's email address, usually used as the login ID and also the from address when sending email.
 
AbstractProvider $provider
 An instance of the League OAuth Client Provider.
 

Detailed Description

OAuth - OAuth2 authentication wrapper class.

Uses the oauth2-client package from the League of Extraordinary Packages.

See also
http://oauth2-client.thephpleague.com
Author
Marcus Bointon (Synchro/coolbru) phpma.nosp@m.iler.nosp@m.@sync.nosp@m.hrom.nosp@m.edia..nosp@m.co.u.nosp@m.k

Constructor & Destructor Documentation

◆ __construct()

PHPMailer\PHPMailer\OAuth::__construct ( $options)

OAuth constructor.

Parameters
array$optionsAssociative array containing provider, userName, clientSecret, clientId and refreshToken elements

Member Function Documentation

◆ getGrant()

PHPMailer\PHPMailer\OAuth::getGrant ( )
protected

Get a new RefreshToken.

Return values
RefreshToken

◆ getOauth64()

PHPMailer\PHPMailer\OAuth::getOauth64 ( )

Generate a base64-encoded OAuth token.

Return values
string

Implements PHPMailer\PHPMailer\OAuthTokenProvider.

◆ getToken()

PHPMailer\PHPMailer\OAuth::getToken ( )
protected

Get a new AccessToken.

Return values
AccessToken

Reimplemented in moodle_phpmailer_oauth.


The documentation for this class was generated from the following file: