PHP Class PHPMailer\PHPMailer\OAuth

Uses the oauth2-client package from the League of Extraordinary Packages
Author: Marcus Bointon (Synchro/coolbru) ([email protected])
Show file Open project: nukeviet/nukeviet

Protected Properties

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

Public Methods

Method Description
__construct ( array $options ) OAuth constructor.
getOauth64 ( ) : string Generate a base64-encoded OAuth token.

Protected Methods

Method Description
getGrant ( ) : League\OAuth2\Client\Grant\RefreshToken Get a new RefreshToken.
getToken ( ) : League\OAuth2\Client\Token\AccessToken Get a new AccessToken.

Method Details

__construct() public method

OAuth constructor.
public __construct ( array $options )
$options array Associative array containing `provider`, `userName`, `clientSecret`, `clientId` and `refreshToken` elements

getGrant() protected method

Get a new RefreshToken.
protected getGrant ( ) : League\OAuth2\Client\Grant\RefreshToken
return League\OAuth2\Client\Grant\RefreshToken

getOauth64() public method

Generate a base64-encoded OAuth token.
public getOauth64 ( ) : string
return string

getToken() protected method

Get a new AccessToken.
protected getToken ( ) : League\OAuth2\Client\Token\AccessToken
return League\OAuth2\Client\Token\AccessToken

Property Details

$oauthClientId protected property

The client ID, generated in the app definition of the service you're connecting to.
protected string $oauthClientId
return string

$oauthClientSecret protected property

The client secret, generated in the app definition of the service you're connecting to.
protected string $oauthClientSecret
return string

$oauthRefreshToken protected property

The refresh token, used to obtain new AccessTokens.
protected string $oauthRefreshToken
return string

$oauthToken protected property

The current OAuth access token.
protected League\OAuth2\Client\Token\AccessToken $oauthToken
return League\OAuth2\Client\Token\AccessToken

$oauthUserEmail protected property

The user's email address, usually used as the login ID and also the from address when sending email.
protected string $oauthUserEmail
return string

$provider protected property

An instance of the League OAuth Client Provider.
protected League\OAuth2\Client\Provider\AbstractProvider $provider
return League\OAuth2\Client\Provider\AbstractProvider