TYPO3  7.6
Public Member Functions | Protected Member Functions | List of all members
Swift_Transport_Esmtp_Auth_XOAuth2Authenticator Class Reference
Inheritance diagram for Swift_Transport_Esmtp_Auth_XOAuth2Authenticator:
Swift_Transport_Esmtp_Authenticator

Public Member Functions

 getAuthKeyword ()
 
 authenticate (Swift_Transport_SmtpAgent $agent, $email, $token)
 

Protected Member Functions

 constructXOAuth2Params ($email, $token)
 

Detailed Description

Handles XOAUTH2 authentication.

Example: $transport = Swift_SmtpTransport::newInstance('smtp.gmail.com', 587, 'tls') ->setAuthMode('XOAUTH2') ->setUsername('YOUR_EMAIL_ADDRESS') ->setPassword('YOUR_ACCESS_TOKEN');

Author
xu.liAthen.nosp@m.aLig.nosp@m.htene.nosp@m.dMyP.nosp@m.ath@g.nosp@m.mail.nosp@m..com
See Also
https://developers.google.com/google-apps/gmail/xoauth2_protocol

Definition at line 26 of file XOAuth2Authenticator.php.

Member Function Documentation

authenticate ( Swift_Transport_SmtpAgent  $agent,
  $email,
  $token 
)

Try to authenticate the user with $email and $token.

Parameters
Swift_Transport_SmtpAgent$agent
string$email
string$token
Returns
bool

Implements Swift_Transport_Esmtp_Authenticator.

Definition at line 47 of file XOAuth2Authenticator.php.

References constructXOAuth2Params(), and Swift_Transport_SmtpAgent\executeCommand().

constructXOAuth2Params (   $email,
  $token 
)
protected
getAuthKeyword ( )

Get the name of the AUTH mechanism this Authenticator handles.

Returns
string

Implements Swift_Transport_Esmtp_Authenticator.

Definition at line 33 of file XOAuth2Authenticator.php.