From c38edfcb32747c7c25f1df5968288b9eef43fddc Mon Sep 17 00:00:00 2001 From: redmatrix Date: Fri, 1 Jan 2016 16:12:43 -0800 Subject: issue #241 (redmatrix issue 405) --- mod/wfinger.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'mod/wfinger.php') diff --git a/mod/wfinger.php b/mod/wfinger.php index 8b9abe4af..5270c8f31 100644 --- a/mod/wfinger.php +++ b/mod/wfinger.php @@ -100,6 +100,11 @@ function wfinger_init(&$a) { 'href' => z_root() . '/channel/' . $r[0]['channel_address'], ), + array( + 'rel' => 'http://ostatus.org/schema/1.0/subscribe', + 'template' => z_root() . '/follow/url={uri}', + ), + array( 'rel' => 'http://purl.org/zot/protocol', 'href' => z_root() . '/.well-known/zot-info' . '?address=' . $r[0]['xchan_addr'], -- cgit v1.2.3 From 28d07fd6b2b48632edadc94055c1be8a0cb11274 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Fri, 19 Feb 2016 00:06:10 -0800 Subject: move storage assets to zotlabs/storage --- mod/wfinger.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'mod/wfinger.php') diff --git a/mod/wfinger.php b/mod/wfinger.php index 5270c8f31..0c1c03f08 100644 --- a/mod/wfinger.php +++ b/mod/wfinger.php @@ -51,8 +51,6 @@ function wfinger_init(&$a) { header('Access-Control-Allow-Origin: *'); - header('Content-type: application/jrd+json'); - if($resource && $r) { @@ -124,7 +122,6 @@ function wfinger_init(&$a) { $arr = array('channel' => $r[0], 'request' => $_REQUEST, 'result' => $result); call_hooks('webfinger',$arr); - echo json_encode($arr['result']); - killme(); + json_return_and_die($arr['result'],'application/jrd+json'); } \ No newline at end of file -- cgit v1.2.3 From 50c7c33ed199fad3b17b8beef544743e107e547f Mon Sep 17 00:00:00 2001 From: redmatrix Date: Fri, 19 Feb 2016 12:02:23 -0800 Subject: no linefeed at end --- mod/wfinger.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mod/wfinger.php') diff --git a/mod/wfinger.php b/mod/wfinger.php index 0c1c03f08..a745d9f84 100644 --- a/mod/wfinger.php +++ b/mod/wfinger.php @@ -124,4 +124,4 @@ function wfinger_init(&$a) { json_return_and_die($arr['result'],'application/jrd+json'); -} \ No newline at end of file +} -- cgit v1.2.3 From 3bde7b8f18bf17e87fc803dfb09efa74719aa60e Mon Sep 17 00:00:00 2001 From: redmatrix Date: Mon, 22 Feb 2016 16:20:19 -0800 Subject: add salmon key param --- mod/wfinger.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'mod/wfinger.php') diff --git a/mod/wfinger.php b/mod/wfinger.php index a745d9f84..3f9826f9b 100644 --- a/mod/wfinger.php +++ b/mod/wfinger.php @@ -106,6 +106,11 @@ function wfinger_init(&$a) { array( 'rel' => 'http://purl.org/zot/protocol', 'href' => z_root() . '/.well-known/zot-info' . '?address=' . $r[0]['xchan_addr'], + ), + + array( + 'rel' => 'magic-public-key', + 'href' => 'data:application/magic-public-key,' . salmon_key($r[0]['channel_pubkey']), ) ); -- cgit v1.2.3 From 38eb79705e4de252f29e56543de8a287132b488e Mon Sep 17 00:00:00 2001 From: redmatrix Date: Wed, 16 Mar 2016 18:00:13 -0700 Subject: lots of work on federated channel discovery --- mod/wfinger.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'mod/wfinger.php') diff --git a/mod/wfinger.php b/mod/wfinger.php index 3f9826f9b..5c1a74f10 100644 --- a/mod/wfinger.php +++ b/mod/wfinger.php @@ -73,13 +73,15 @@ function wfinger_init(&$a) { $result['aliases'] = array(); - $result['properties'] = array('http://webfinger.net/ns/name' => $r[0]['channel_name']); + $result['properties'] = array( + 'http://webfinger.net/ns/name' => $r[0]['channel_name'], + 'http://xmlns.com/foaf/0.1/name' => $r[0]['channel_name'] + ); foreach($aliases as $alias) if($alias != $resource) $result['aliases'][] = $alias; - $result['links'] = array( array( -- cgit v1.2.3 From 9abd95fad3784a10fc48bc40f9b8a75d7d74edda Mon Sep 17 00:00:00 2001 From: redmatrix Date: Thu, 31 Mar 2016 16:06:03 -0700 Subject: static App --- mod/wfinger.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mod/wfinger.php') diff --git a/mod/wfinger.php b/mod/wfinger.php index 5c1a74f10..445dbb349 100644 --- a/mod/wfinger.php +++ b/mod/wfinger.php @@ -32,7 +32,7 @@ function wfinger_init(&$a) { $channel = str_replace('acct:','',$resource); if(strpos($channel,'@') !== false) { $host = substr($channel,strpos($channel,'@')+1); - if(strcasecmp($host,get_app()->get_hostname())) { + if(strcasecmp($host,App::get_hostname())) { goaway('https://' . $host . '/.well-known/webfinger?f=&resource=' . $resource . (($zot) ? '&zot=' . $zot : '')); } $channel = substr($channel,0,strpos($channel,'@')); -- cgit v1.2.3