]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/CasAuthentication/CasAuthenticationPlugin.php
[OStatus] Wrong exception was being caught
[quix0rs-gnu-social.git] / plugins / CasAuthentication / CasAuthenticationPlugin.php
index ecc642b8568ebac7796cda0c8af532142a334d9d..17c5f49d7ecedef9b643139965b47d79ffb2e950 100644 (file)
@@ -36,10 +36,13 @@ set_include_path(get_include_path() . PATH_SEPARATOR . dirname(__FILE__) . '/ext
 
 class CasAuthenticationPlugin extends AuthenticationPlugin
 {
+    const PLUGIN_VERSION = '2.0.0';
+
     public $server;
     public $port = 443;
     public $path = '';
     public $takeOverLogin = false;
+    public $user_whitelist = null;
 
     function checkPassword($username, $password)
     {
@@ -54,10 +57,10 @@ class CasAuthenticationPlugin extends AuthenticationPlugin
          case 'phpCAS':
             require_once(INSTALLDIR.'/plugins/CasAuthentication/extlib/CAS.php');
             return false;
-         case 'CasloginAction':
-            require_once(INSTALLDIR.'/plugins/CasAuthentication/' . strtolower(mb_substr($cls, 0, -6)) . '.php');
-            return false;
         }
+
+        // if it's not our exception, try standard places
+        return parent::onAutoload($cls);
     }
 
     function onArgsInitialize(&$args)
@@ -145,14 +148,15 @@ class CasAuthenticationPlugin extends AuthenticationPlugin
         $casSettings['port']=$this->port;
         $casSettings['path']=$this->path;
         $casSettings['takeOverLogin']=$this->takeOverLogin;
+        $casSettings['user_whitelist']=$this->user_whitelist;
     }
 
-    function onPluginVersion(&$versions)
+    function onPluginVersion(array &$versions)
     {
         $versions[] = array('name' => 'CAS Authentication',
-                            'version' => STATUSNET_VERSION,
+                            'version' => self::PLUGIN_VERSION,
                             'author' => 'Craig Andrews',
-                            'homepage' => 'http://status.net/wiki/Plugin:CasAuthentication',
+                            'homepage' => 'https://git.gnu.io/gnu/gnu-social/tree/master/plugins/CasAuthentication',
                             // TRANS: Plugin description. CAS is Central Authentication Service.
                             'rawdescription' => _m('The CAS Authentication plugin allows for StatusNet to handle authentication through CAS (Central Authentication Service).'));
         return true;