]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/xrds.php
OStatus: garbage collect unused PuSH subscriptions when the last local subscriber...
[quix0rs-gnu-social.git] / actions / xrds.php
index 8f09557d185ce34ca3d2a566ddffc76860961f05..534182e3edf065f0223e8412df1a6f3b13bf7007 100644 (file)
@@ -97,27 +97,23 @@ class XrdsAction extends Action
         $xrdsOutputter->element('Type', null, 'xri://$xrds*simple');
         $xrdsOutputter->showXrdsService(OAUTH_ENDPOINT_REQUEST,
                             common_local_url('requesttoken'),
-                            array(OAUTH_AUTH_HEADER, OAUTH_POST_BODY, OAUTH_HMAC_SHA1));
-        $xrdsOutputter->showXrdsService( OAUTH_ENDPOINT_AUTHORIZE,
-                            common_local_url('userauthorization'),
                             array(OAUTH_AUTH_HEADER, OAUTH_POST_BODY, OAUTH_HMAC_SHA1),
                             null,
-                            $this->user->getIdentifierURI());
+                            $this->user->uri);
+        $xrdsOutputter->showXrdsService( OAUTH_ENDPOINT_AUTHORIZE,
+                            common_local_url('userauthorization'),
+                            array(OAUTH_AUTH_HEADER, OAUTH_POST_BODY, OAUTH_HMAC_SHA1));
         $xrdsOutputter->showXrdsService(OAUTH_ENDPOINT_ACCESS,
                             common_local_url('accesstoken'),
-                            array(OAUTH_AUTH_HEADER, OAUTH_POST_BODY, OAUTH_HMAC_SHA1),
-                            null,
-                            $this->user->getIdentifierURI());
+                            array(OAUTH_AUTH_HEADER, OAUTH_POST_BODY, OAUTH_HMAC_SHA1));
         $xrdsOutputter->showXrdsService(OAUTH_ENDPOINT_RESOURCE,
                             null,
-                            array(OAUTH_AUTH_HEADER, OAUTH_POST_BODY, OAUTH_HMAC_SHA1),
-                            null,
-                            $this->user->getIdentifierURI());
+                            array(OAUTH_AUTH_HEADER, OAUTH_POST_BODY, OAUTH_HMAC_SHA1));
         $xrdsOutputter->elementEnd('XRD');
         
         //omb
         $xrdsOutputter->elementStart('XRD', array('xmlns' => 'xri://$xrd*($v*2.0)',
-                                          'xml:id' => 'oauth',
+                                          'xml:id' => 'omb',
                                           'xmlns:simple' => 'http://xrds-simple.net/core/1.0',
                                           'version' => '2.0'));
         $xrdsOutputter->element('Type', null, 'xri://$xrds*simple');
@@ -127,10 +123,10 @@ class XrdsAction extends Action
                             common_local_url('updateprofile'));
         $xrdsOutputter->elementEnd('XRD');
         
+        Event::handle('EndUserXRDS', array($this,&$xrdsOutputter));
+
         //misc
         $xrdsOutputter->elementStart('XRD', array('xmlns' => 'xri://$xrd*($v*2.0)',
-                                          'xml:id' => 'oauth',
-                                          'xmlns:simple' => 'http://xrds-simple.net/core/1.0',
                                           'version' => '2.0'));
         $xrdsOutputter->showXrdsService(OAUTH_DISCOVERY,
                             '#oauth');
@@ -138,8 +134,6 @@ class XrdsAction extends Action
                             '#omb');
         $xrdsOutputter->elementEnd('XRD');
 
-        Event::handle('EndUserXRDS', array($this,&$xrdsOutputter));
-
         $xrdsOutputter->endXRDS();
         
     }