\PHPMailer\PHPMailerOAuth

OAuth - OAuth2 authentication wrapper class.

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

Summary

Methods
Properties
Constants
__construct()
getOauth64()
No public properties found
No constants found
getGrant()
getToken()
$provider
$oauthToken
$oauthUserEmail
$oauthClientSecret
$oauthClientId
$oauthRefreshToken
N/A
No private methods found
No private properties found
N/A

Properties

$provider

$provider : \League\OAuth2\Client\Provider\AbstractProvider

An instance of the League OAuth Client Provider.

Type

\League\OAuth2\Client\Provider\AbstractProvider

$oauthToken

$oauthToken : \League\OAuth2\Client\Token\AccessToken

The current OAuth access token.

Type

\League\OAuth2\Client\Token\AccessToken

$oauthUserEmail

$oauthUserEmail : string

The user's email address, usually used as the login ID and also the from address when sending email.

Type

string

$oauthClientSecret

$oauthClientSecret : string

The client secret, generated in the app definition of the service you're connecting to.

Type

string

$oauthClientId

$oauthClientId : string

The client ID, generated in the app definition of the service you're connecting to.

Type

string

$oauthRefreshToken

$oauthRefreshToken : string

The refresh token, used to obtain new AccessTokens.

Type

string

Methods

__construct()

__construct(array  $options) 

OAuth constructor.

Parameters

array $options

Associative array containing provider, userName, clientSecret, clientId and refreshToken elements

getOauth64()

getOauth64() : string

Generate a base64-encoded OAuth token.

Returns

string

getGrant()

getGrant() : \League\OAuth2\Client\Grant\RefreshToken

Get a new RefreshToken.

Returns

\League\OAuth2\Client\Grant\RefreshToken

getToken()

getToken() : \League\OAuth2\Client\Token\AccessToken

Get a new AccessToken.

Returns

\League\OAuth2\Client\Token\AccessToken