diff options
author | Sarven Capadisli <csarven@status.net> | 2010-01-05 01:16:48 +0000 |
---|---|---|
committer | Sarven Capadisli <csarven@status.net> | 2010-01-05 01:16:48 +0000 |
commit | 48289e607bf207b40201075be8b599c0f3fa597e (patch) | |
tree | d310e7091467460905287bc29b33098cf986a906 /plugins/CasAuthentication | |
parent | eb9514120a882aacae38f8b85a1f431852b44b89 (diff) | |
parent | 440b9957f9ae6fdfdb44c39074803fcdbc64112d (diff) |
Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x
Diffstat (limited to 'plugins/CasAuthentication')
-rw-r--r-- | plugins/CasAuthentication/CasAuthenticationPlugin.php | 9 | ||||
-rw-r--r-- | plugins/CasAuthentication/README | 6 |
2 files changed, 14 insertions, 1 deletions
diff --git a/plugins/CasAuthentication/CasAuthenticationPlugin.php b/plugins/CasAuthentication/CasAuthenticationPlugin.php index 8b6ef5462..8f29c7d2a 100644 --- a/plugins/CasAuthentication/CasAuthenticationPlugin.php +++ b/plugins/CasAuthentication/CasAuthenticationPlugin.php @@ -40,6 +40,7 @@ class CasAuthenticationPlugin extends AuthenticationPlugin public $server; public $port = 443; public $path = ''; + public $takeOverLogin = false; function checkPassword($username, $password) { @@ -62,6 +63,14 @@ class CasAuthenticationPlugin extends AuthenticationPlugin } } + function onArgsInitialize(&$args) + { + if($this->takeOverLogin && $args['action'] == 'login') + { + $args['action'] = 'caslogin'; + } + } + function onStartInitializeRouter($m) { $m->connect('main/cas', array('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 )); |