* @category Plugin
* @package StatusNet
* @author Evan Prodromou <evan@status.net>
+ * @author Craig Andrews <candrews@integralblue.com>
* @copyright 2009-2010 StatusNet, Inc.
+ * @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/
*/
* @category Plugin
* @package StatusNet
* @author Evan Prodromou <evan@status.net>
+ * @author Craig Andrews <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/
* @link http://openid.net/
function onStartConnectPath(&$path, &$defaults, &$rules, &$result)
{
if (common_config('site', 'openidonly')) {
- static $block = array('main/login',
- 'main/register',
- 'main/recoverpassword',
+ // Note that we should not remove the login and register
+ // actions. Lots of auth-related things link to them,
+ // such as when visiting a private site without a session
+ // or revalidating a remembered login for admin work.
+ //
+ // We take those two over with redirects to ourselves
+ // over in onArgsInitialize().
+ static $block = array('main/recoverpassword',
'settings/password');
if (in_array($path, $block)) {
return true;
}
+ /**
+ * Add OpenID information to the Account Management Control Document
+ * Event supplied by the Account Manager plugin
+ *
+ * @param array &$amcd Array that expresses the AMCD
+ *
+ * @return boolean hook value
+ */
+
+ function onEndAccountManagementControlDocument(&$amcd)
+ {
+ $amcd['auth-methods']['openid'] = array(
+ 'connect' => array(
+ 'method' => 'POST',
+ 'path' => common_local_url('openidlogin'),
+ 'params' => array(
+ 'identity' => 'openid_url'
+ )
+ )
+ );
+ }
+
/**
* Add our version information to output
*