Implemented WebFinger and replaced our XRD with PEAR XML_XRD

New plugins:
* LRDD
    LRDD implements client-side RFC6415 and RFC7033 resource descriptor
    discovery procedures. I.e. LRDD, host-meta and WebFinger stuff.

    OStatus and OpenID now depend on the LRDD plugin (XML_XRD).

* WebFinger
    This plugin implements the server-side of RFC6415 and RFC7033. Note:
    WebFinger technically doesn't handle XRD, but we serve both that and
    JRD (JSON Resource Descriptor), depending on Accept header and one
    ugly hack to check for old StatusNet installations.

    WebFinger depends on LRDD.

We might make this even prettier by using Net_WebFinger, but it is not
currently RFC7033 compliant (no /.well-known/webfinger resource GETs).

Disabling the WebFinger plugin would effectively render your site non-
federated (which might be desired on a private site).

Disabling the LRDD plugin would make your site unable to do modern web
URI lookups (making life just a little bit harder).
This commit is contained in:
Mikael Nordfeldth
2013-09-30 17:13:03 +02:00
parent 44f7ad612a
commit a0e107f17f
59 changed files with 2942 additions and 1253 deletions

View File

@@ -157,13 +157,13 @@ class LooseOstatusProfile extends Ostatus_profile
// Check if they've got an LRDD header
$lrdd = LinkHeader::getLink($response, 'lrdd', 'application/xrd+xml');
if (!empty($lrdd)) {
$xrd = Discovery::fetchXrd($lrdd);
try {
$xrd = new XML_XRD();
$xrd->loadFile($lrdd);
$xrdHints = DiscoveryHints::fromXRD($xrd);
$hints = array_merge($hints, $xrdHints);
} catch (Exception $e) {
// No hints available from XRD
}
// If discovery found a feedurl (probably from LRDD), use it.