コード例 #1
0
ファイル: Oauth2.php プロジェクト: DanMaiman/Awfulkid
 /**
  * Perform LOGIN authentication with supplied credentials
  *
  * @return void
  */
 public function auth()
 {
     // Ensure AUTH has not already been initiated.
     parent::auth();
     $this->_send('AUTH XOAUTH2 ' . $this->_xoauth2_request);
     $this->_expect(235);
     $this->_auth = true;
 }
コード例 #2
0
ファイル: Plain.php プロジェクト: DanMaiman/Awfulkid
 /**
  * Perform PLAIN authentication with supplied credentials
  *
  * @return void
  */
 public function auth()
 {
     // Ensure AUTH has not already been initiated.
     parent::auth();
     $this->_send('AUTH PLAIN');
     $this->_expect(334);
     $this->_send(base64_encode("" . $this->_username . "" . $this->_password));
     $this->_expect(235);
     $this->_auth = true;
 }
コード例 #3
0
ファイル: Crammd5.php プロジェクト: DanMaiman/Awfulkid
 /**
  * @todo Perform CRAM-MD5 authentication with supplied credentials
  *
  * @return void
  */
 public function auth()
 {
     // Ensure AUTH has not already been initiated.
     parent::auth();
     $this->_send('AUTH CRAM-MD5');
     $challenge = $this->_expect(334);
     $challenge = base64_decode($challenge);
     $digest = $this->_hmacMd5($this->_password, $challenge);
     $this->_send(base64_encode($this->_username . ' ' . $digest));
     $this->_expect(235);
     $this->_auth = true;
 }