X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FCasAuthentication%2FCasAuthenticationPlugin.php;h=1662db3ebafab9fc03c31b0a8e9ea65bbb7de12b;hb=efa7dcc66dd8add017d9ca3fb8eacde5cd929fef;hp=428aafb024574a3e208973b7d43cdb6e1ea87827;hpb=6aa4a555dc4424567eb230b66c2c1fb8b064de22;p=quix0rs-gnu-social.git diff --git a/plugins/CasAuthentication/CasAuthenticationPlugin.php b/plugins/CasAuthentication/CasAuthenticationPlugin.php index 428aafb024..1662db3eba 100644 --- a/plugins/CasAuthentication/CasAuthenticationPlugin.php +++ b/plugins/CasAuthentication/CasAuthenticationPlugin.php @@ -22,7 +22,7 @@ * @category Plugin * @package StatusNet * @author Craig Andrews - * @copyright 2009 Craig Andrews http://candrews.integralblue.com + * @copyright 2009 Free Software Foundation, Inc http://www.fsf.org * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ @@ -39,6 +39,7 @@ class CasAuthenticationPlugin extends AuthenticationPlugin public $server; public $port = 443; public $path = ''; + public $takeOverLogin = false; function checkPassword($username, $password) { @@ -56,8 +57,14 @@ class CasAuthenticationPlugin extends AuthenticationPlugin case 'CasloginAction': require_once(INSTALLDIR.'/plugins/CasAuthentication/' . strtolower(mb_substr($cls, 0, -6)) . '.php'); return false; - default: - return parent::onAutoload($cls); + } + } + + function onArgsInitialize(&$args) + { + if($this->takeOverLogin && $args['action'] == 'login') + { + $args['action'] = 'caslogin'; } } @@ -130,5 +137,17 @@ class CasAuthenticationPlugin extends AuthenticationPlugin $casSettings['server']=$this->server; $casSettings['port']=$this->port; $casSettings['path']=$this->path; + $casSettings['takeOverLogin']=$this->takeOverLogin; + } + + function onPluginVersion(&$versions) + { + $versions[] = array('name' => 'CAS Authentication', + 'version' => STATUSNET_VERSION, + 'author' => 'Craig Andrews', + 'homepage' => 'http://status.net/wiki/Plugin:CasAuthentication', + 'rawdescription' => + _m('The CAS Authentication plugin allows for StatusNet to handle authentication through CAS (Central Authentication Service).')); + return true; } }