diff options
author | Brenda Wallace <shiny@cpan.org> | 2010-01-09 21:43:25 +0000 |
---|---|---|
committer | Brenda Wallace <shiny@cpan.org> | 2010-01-09 21:43:25 +0000 |
commit | 4de09d6bd4eab3259d42fa846e4dd31f2516a038 (patch) | |
tree | df650402df1abcb64e1aa9640eeeb782b3c20f03 /plugins/CasAuthentication | |
parent | f4459dfedcdea2f2a6078bedf9530deb45b6d52c (diff) | |
parent | f396701b6466749c09ce16b1e7f2f96c10b05cdd (diff) |
Merge commit 'origin/0.9.x' into 0.9.x
Diffstat (limited to 'plugins/CasAuthentication')
-rw-r--r-- | plugins/CasAuthentication/CasAuthenticationPlugin.php | 11 | ||||
-rw-r--r-- | plugins/CasAuthentication/README | 6 |
2 files changed, 14 insertions, 3 deletions
diff --git a/plugins/CasAuthentication/CasAuthenticationPlugin.php b/plugins/CasAuthentication/CasAuthenticationPlugin.php index 428aafb02..818a11f77 100644 --- a/plugins/CasAuthentication/CasAuthenticationPlugin.php +++ b/plugins/CasAuthentication/CasAuthenticationPlugin.php @@ -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'; } } diff --git a/plugins/CasAuthentication/README b/plugins/CasAuthentication/README index 2ee54dc05..c17a28e54 100644 --- a/plugins/CasAuthentication/README +++ b/plugins/CasAuthentication/README @@ -21,6 +21,9 @@ password_changeable*: must be set to false. This plugin does not support changin server*: CAS server to authentication against port (443): Port the CAS server listens on. Almost always 443 path (): Path on the server to CAS. Usually blank. +takeOverLogin (false): Take over the main login action. If takeOverLogin is + set, anytime the standard username/password login form would be shown, + a CAS login will be done instead. * required default values are in (parenthesis) @@ -33,6 +36,7 @@ addPlugin('casAuthentication', array( 'autoregistration'=>true, 'server'=>'sso-cas.univ-rennes1.fr', 'port'=>443, - 'path'=>'' + 'path'=>'', + 'takeOverLogin'=>true )); |