Subversion Repositories Applications.papyrus

Rev

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

Rev 1173 Rev 1713
Line 16... Line 16...
16
 * @package    Auth
16
 * @package    Auth
17
 * @author     Michael Bretterklieber <michael@bretterklieber.com> 
17
 * @author     Michael Bretterklieber <michael@bretterklieber.com>
18
 * @author     Adam Ashley <aashley@php.net>
18
 * @author     Adam Ashley <aashley@php.net>
19
 * @copyright  2001-2006 The PHP Group
19
 * @copyright  2001-2006 The PHP Group
20
 * @license    http://www.php.net/license/3_01.txt  PHP License 3.01
20
 * @license    http://www.php.net/license/3_01.txt  PHP License 3.01
21
 * @version    CVS: $Id: RADIUS.php,v 1.2 2006-12-14 15:04:28 jp_milcent Exp $
21
 * @version    CVS: $Id: RADIUS.php,v 1.3 2007-11-19 15:11:00 jp_milcent Exp $
22
 * @link       http://pear.php.net/package/Auth
22
 * @link       http://pear.php.net/package/Auth
23
 * @since      File available since Release 1.2.0
23
 * @since      File available since Release 1.2.0
24
 */
24
 */
Line 25... Line 25...
25
 
25
 
Line 39... Line 39...
39
 * @package    Auth
39
 * @package    Auth
40
 * @author     Michael Bretterklieber <michael@bretterklieber.com>
40
 * @author     Michael Bretterklieber <michael@bretterklieber.com>
41
 * @author     Adam Ashley <aashley@php.net>
41
 * @author     Adam Ashley <aashley@php.net>
42
 * @copyright  2001-2006 The PHP Group
42
 * @copyright  2001-2006 The PHP Group
43
 * @license    http://www.php.net/license/3_01.txt  PHP License 3.01
43
 * @license    http://www.php.net/license/3_01.txt  PHP License 3.01
44
 * @version    Release: 1.4.3  File: $Revision: 1.2 $
44
 * @version    Release: 1.5.4  File: $Revision: 1.3 $
45
 * @link       http://pear.php.net/package/Auth
45
 * @link       http://pear.php.net/package/Auth
46
 * @since      Class available since Release 1.2.0
46
 * @since      Class available since Release 1.2.0
47
 */
47
 */
48
class Auth_Container_RADIUS extends Auth_Container
48
class Auth_Container_RADIUS extends Auth_Container
49
{
49
{
Line 123... Line 123...
123
     * @param  string Password
123
     * @param  string Password
124
     * @return bool   true on success, false on reject
124
     * @return bool   true on success, false on reject
125
     */
125
     */
126
    function fetchData($username, $password, $challenge = null)
126
    function fetchData($username, $password, $challenge = null)
127
    {
127
    {
-
 
128
        $this->log('Auth_Container_RADIUS::fetchData() called.', AUTH_LOG_DEBUG);
-
 
129
 
128
        switch($this->authtype) {
130
        switch($this->authtype) {
129
        case 'CHAP_MD5':
131
            case 'CHAP_MD5':
130
        case 'MSCHAPv1':
132
            case 'MSCHAPv1':
131
            if (isset($challenge)) {
133
                if (isset($challenge)) {
132
                $this->radius->challenge = $challenge;
134
                    $this->radius->challenge = $challenge;
Line 138... Line 140...
138
                $crpt = new $classname;
140
                    $crpt = new $classname;
139
                $crpt->password = $password;
141
                    $crpt->password = $password;
140
                $this->radius->challenge = $crpt->challenge;
142
                    $this->radius->challenge = $crpt->challenge;
141
                $this->radius->chapid    = $crpt->chapid;
143
                    $this->radius->chapid    = $crpt->chapid;
142
                $this->radius->response  = $crpt->challengeResponse();
144
                    $this->radius->response  = $crpt->challengeResponse();
143
                break;
-
 
144
            }
145
                }
-
 
146
                break;
Line 145... Line 147...
145
 
147
 
146
        case 'MSCHAPv2':
148
            case 'MSCHAPv2':
147
            require_once 'Crypt/CHAP.php';
149
                require_once 'Crypt/CHAP.php';
148
            $crpt = new Crypt_MSCHAPv2;
150
                $crpt = new Crypt_MSCHAPv2;