PHP 클래스 Swift_Transport_Esmtp_Auth_XOAuth2Authenticator, Halite

Example: $transport = Swift_SmtpTransport::newInstance('smtp.gmail.com', 587, 'tls') ->setAuthMode('XOAUTH2') ->setUsername('YOUR_EMAIL_ADDRESS') ->setPassword('YOUR_ACCESS_TOKEN');
또한 보기: https://developers.google.com/google-apps/gmail/xoauth2_protocol
저자: xu.li ([email protected])
상속: implements Swift_Transport_Esmtp_Authenticator
파일 보기 프로젝트 열기: HaliteChallenge/Halite

공개 메소드들

메소드 설명
authenticate ( Swift_Transport_SmtpAgent $agent, string $email, string $token ) : boolean Try to authenticate the user with $email and $token.
getAuthKeyword ( ) : string Get the name of the AUTH mechanism this Authenticator handles.

보호된 메소드들

메소드 설명
constructXOAuth2Params ( $email, $token ) Construct the auth parameter.

메소드 상세

authenticate() 공개 메소드

Try to authenticate the user with $email and $token.
public authenticate ( Swift_Transport_SmtpAgent $agent, string $email, string $token ) : boolean
$agent Swift_Transport_SmtpAgent
$email string
$token string
리턴 boolean

constructXOAuth2Params() 보호된 메소드

Construct the auth parameter.
또한 보기: https://developers.google.com/google-apps/gmail/xoauth2_protocol#the_sasl_xoauth2_mechanism
protected constructXOAuth2Params ( $email, $token )

getAuthKeyword() 공개 메소드

Get the name of the AUTH mechanism this Authenticator handles.
public getAuthKeyword ( ) : string
리턴 string