cvs: pear /File_HtAccess HtAccess.php TODO

From: Date: Sat, 11 Jan 2003 18:27:15 +0000
Subject: cvs: pear /File_HtAccess HtAccess.php TODO
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-8188@lists.php.net to get a copy of this message
tuupola Sat Jan 11 13:27:15 2003 EDT Modified files: /pear/File_HtAccess HtAccess.php TODO Log: * added support for Digest authentication Index: pear/File_HtAccess/HtAccess.php diff -u pear/File_HtAccess/HtAccess.php:1.6 pear/File_HtAccess/HtAccess.php:1.7 --- pear/File_HtAccess/HtAccess.php:1.6 Fri Jan 3 10:25:35 2003 +++ pear/File_HtAccess/HtAccess.php Sat Jan 11 13:27:15 2003 @@ -16,7 +16,7 @@ // | Author: Mika Tuupola <tuupola@appelsiini.net> | // +----------------------------------------------------------------------+ // -// $Id: HtAccess.php,v 1.6 2003/01/03 15:25:35 tuupola Exp $ +// $Id: HtAccess.php,v 1.7 2003/01/11 18:27:15 tuupola Exp $ // require_once 'PEAR.php' ; @@ -65,6 +65,8 @@ var $authtype; var $authuserfile; var $authgroupfile; + var $authdigestfile; + var $authdigestgroupfile; var $require = array(); var $additional = array(); @@ -112,10 +114,17 @@ } elseif (preg_match('/AuthGroupFile/i', $data[0])) { $this->setAuthGroupFile($data[1]); + + } elseif (preg_match('/AuthDigestFile/i', $data[0])) { + $this->setAuthDigestFile($data[1]); + + } elseif (preg_match('/AuthDigestGroupFile/i', $data[0])) { + $this->setAuthDigestGroupFile($data[1]); } elseif (preg_match('/Require/i', $buffer)) { $require = split(' ', $data[1]); $this->setRequire($require); + } elseif (trim($buffer)) { $this->addAdditional($buffer); } @@ -189,6 +198,28 @@ function setAuthGroupFile($file='') { $this->authgroupfile = $file; } + + /** + * Set the value of authdigestfile property + * + * @access public + * @param string $file + */ + + function setAuthDigestFile($file='') { + $this->authdigestfile = $file; + } + + /** + * Set the value of authdigestgroupfile property + * + * @access public + * @param string $file + */ + + function setAuthDigestGroupFile($file='') { + $this->authdigestgroupfile = $file; + } /** * Set the value of require property @@ -312,6 +343,28 @@ } /** + * Get the value of authdigestfile property + * + * @access public + * @return string + */ + + function getAuthDigestFile() { + return($this->authdigestfile); + } + + /** + * Get the value of authdigestgroupfile property + * + * @access public + * @return string + */ + + function getAuthDigestGroupFile() { + return($this->authdigestgroupfile); + } + + /** * Get the value(s) of require property * * @access public @@ -370,10 +423,17 @@ $str = 'AuthName ' . $this->getAuthName() . "\n"; $str .= 'AuthType ' . $this->getAuthType() . "\n"; - $str .= 'AuthUserFile ' . $this->getAuthUserFile() . "\n"; - - if (trim($this->getAuthGroupFile())) { - $str .= 'AuthGroupFile ' . $this->getAuthGroupFile() . "\n"; + + if ('basic' == strtolower($this->getAuthType())) { + $str .= 'AuthUserFile ' . $this->getAuthUserFile() . "\n"; + if (trim($this->getAuthGroupFile())) { + $str .= 'AuthGroupFile ' . $this->getAuthGroupFile() . "\n"; + } + } elseif ('digest' == strtolower($this->getAuthType())) { + $str .= 'AuthDigestFile ' . $this->getAuthDigestFile() . "\n"; + if (trim($this->getAuthDigestGroupFile())) { + $str .= 'AuthDigestGroupFile ' . $this->getAuthDigestGroupFile() . "\n"; + } } $str .= 'Require ' . $this->getRequire('string') . "\n"; Index: pear/File_HtAccess/TODO diff -u pear/File_HtAccess/TODO:1.3 pear/File_HtAccess/TODO:1.4 --- pear/File_HtAccess/TODO:1.3 Tue Nov 26 10:17:08 2002 +++ pear/File_HtAccess/TODO Sat Jan 11 13:27:15 2003 @@ -3,3 +3,6 @@ as a nice addition (or bloat). * Consider using file locking ala File_Passwd + +* Support for Digest authentication +

« previous php.pear.cvs (#8188) next »