Subversion Repositories Applications.papyrus

Rev

Rev 1173 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1173 Rev 1713
Line 12... Line 12...
12
 * the PHP License and are unable to obtain it through the web, please
12
 * the PHP License and are unable to obtain it through the web, please
13
 * send a note to license@php.net so we can mail you a copy immediately.
13
 * send a note to license@php.net so we can mail you a copy immediately.
14
 *
14
 *
15
 * @category   Authentication
15
 * @category   Authentication
16
 * @package    Auth
16
 * @package    Auth
17
 * @author     Stefan Ekman <stekman@sedata.org> 
17
 * @author     Stefan Ekman <stekman@sedata.org>
18
 * @author     Martin Jansen <mj@php.net>
18
 * @author     Martin Jansen <mj@php.net>
19
 * @author     Mika Tuupola <tuupola@appelsiini.net> 
19
 * @author     Mika Tuupola <tuupola@appelsiini.net>
20
 * @author     Adam Ashley <aashley@php.net>
20
 * @author     Adam Ashley <aashley@php.net>
21
 * @copyright  2001-2006 The PHP Group
21
 * @copyright  2001-2006 The PHP Group
22
 * @license    http://www.php.net/license/3_01.txt  PHP License 3.01
22
 * @license    http://www.php.net/license/3_01.txt  PHP License 3.01
23
 * @version    CVS: $Id: POP3.php,v 1.2 2006-12-14 15:04:28 jp_milcent Exp $
23
 * @version    CVS: $Id: POP3.php,v 1.3 2007-11-19 15:11:00 jp_milcent Exp $
24
 * @link       http://pear.php.net/package/Auth
24
 * @link       http://pear.php.net/package/Auth
25
 * @since      File available since Release 1.2.0
25
 * @since      File available since Release 1.2.0
26
 */
26
 */
Line 27... Line 27...
27
 
27
 
Line 42... Line 42...
42
 * Storage driver for Authentication on a POP3 server.
42
 * Storage driver for Authentication on a POP3 server.
43
 *
43
 *
44
 * @category   Authentication
44
 * @category   Authentication
45
 * @package    Auth
45
 * @package    Auth
46
 * @author     Martin Jansen <mj@php.net>
46
 * @author     Martin Jansen <mj@php.net>
47
 * @author     Mika Tuupola <tuupola@appelsiini.net> 
47
 * @author     Mika Tuupola <tuupola@appelsiini.net>
48
 * @author     Adam Ashley <aashley@php.net>
48
 * @author     Adam Ashley <aashley@php.net>
49
 * @copyright  2001-2006 The PHP Group
49
 * @copyright  2001-2006 The PHP Group
50
 * @license    http://www.php.net/license/3_01.txt  PHP License 3.01
50
 * @license    http://www.php.net/license/3_01.txt  PHP License 3.01
51
 * @version    Release: 1.4.3  File: $Revision: 1.2 $
51
 * @version    Release: 1.5.4  File: $Revision: 1.3 $
52
 * @link       http://pear.php.net/package/Auth
52
 * @link       http://pear.php.net/package/Auth
53
 * @since      Class available since Release 1.2.0
53
 * @since      Class available since Release 1.2.0
54
 */
54
 */
55
class Auth_Container_POP3 extends Auth_Container
55
class Auth_Container_POP3 extends Auth_Container
56
{
56
{
Line 75... Line 75...
75
     * Prefered POP3 authentication method. Acceptable values:
75
     * Prefered POP3 authentication method. Acceptable values:
76
     *      Boolean TRUE    - Use Net_POP3's autodetection
76
     *      Boolean TRUE    - Use Net_POP3's autodetection
77
     *      String 'DIGEST-MD5','CRAM-MD5','LOGIN','PLAIN','APOP','USER'
77
     *      String 'DIGEST-MD5','CRAM-MD5','LOGIN','PLAIN','APOP','USER'
78
     *                      - Attempt this authentication style first
78
     *                      - Attempt this authentication style first
79
     *                        then fallback to autodetection.
79
     *                        then fallback to autodetection.
80
     * @var mixed 
80
     * @var mixed
81
     */
81
     */
82
    var $method=true;
82
    var $method=true;
Line 83... Line 83...
83
 
83
 
84
    // }}}
84
    // }}}
Line 125... Line 125...
125
     * @param   string Password
125
     * @param   string Password
126
     * @return  boolean
126
     * @return  boolean
127
     */
127
     */
128
    function fetchData($username, $password)
128
    function fetchData($username, $password)
129
    {
129
    {
-
 
130
        $this->log('Auth_Container_POP3::fetchData() called.', AUTH_LOG_DEBUG);
130
        $pop3 =& new Net_POP3();
131
        $pop3 =& new Net_POP3();
131
        $res = $pop3->connect($this->server, $this->port, $this->method);
132
        $res = $pop3->connect($this->server, $this->port, $this->method);
132
        if (!$res) {
133
        if (!$res) {
-
 
134
            $this->log('Connection to POP3 server failed.', AUTH_LOG_DEBUG);
133
            return $res;
135
            return $res;
134
        }
136
        }
135
        $result = $pop3->login($username, $password);
137
        $result = $pop3->login($username, $password);
136
        $pop3->disconnect();
138
        $pop3->disconnect();
137
        return $result;
139
        return $result;