moving webfinger action to xrdaction

This commit is contained in:
James Walker 2010-02-25 17:52:18 -05:00
parent 5ae64a7adb
commit 93f4f07c12
3 changed files with 6 additions and 6 deletions

View File

@ -43,8 +43,8 @@ class OStatusPlugin extends Plugin
// Discovery actions
$m->connect('.well-known/host-meta',
array('action' => 'hostmeta'));
$m->connect('main/webfinger',
array('action' => 'webfinger'));
$m->connect('main/xrd',
array('action' => 'xrd'));
$m->connect('main/ostatus',
array('action' => 'ostatusinit'));
$m->connect('main/ostatus?nickname=:nickname',

View File

@ -32,7 +32,7 @@ class HostMetaAction extends Action
parent::handle();
$domain = common_config('site', 'server');
$url = common_local_url('webfinger');
$url = common_local_url('xrd');
$url.= '?uri={uri}';
$xrd = new XRD();

View File

@ -24,7 +24,7 @@
if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
class WebfingerAction extends Action
class XrdAction extends Action
{
public $uri;
@ -44,7 +44,7 @@ class WebfingerAction extends Action
$xrd = new XRD();
list($nick, $domain) = explode('@', urldecode($acct));
list($nick, $domain) = explode('@', substr(urldecode($acct), 5));
$nick = common_canonical_nickname($nick);
$this->user = User::staticGet('nickname', $nick);
@ -91,7 +91,7 @@ class WebfingerAction extends Action
if (!$magickey) {
// No keypair yet, let's generate one.
$magickey = new Magicsig();
$magickey->generate();
$magickey->generate($this->user->id);
}
$xrd->links[] = array('rel' => Magicsig::PUBLICKEYREL,