- $this->show_service(OAUTH_ENDPOINT_RESOURCE,
- NULL,
- array(OAUTH_AUTH_HEADER, OAUTH_POST_BODY),
- array(OAUTH_HMAC_SHA1));
-
- common_element_end('XRD');
-
- # XXX: decide whether to include user's ID/nickname in postNotice URL
-
- common_element_start('XRD', array('xmlns' => 'xri://$xrd*($v*2.0)',
- 'xml:id' => 'omb',
- 'xmlns:simple' => 'http://xrds-simple.net/core/1.0',
- 'version' => '2.0'));
-
- common_element('Type', NULL, 'xri://$xrds*simple');
-
- $this->show_service(OMB_ENDPOINT_POSTNOTICE,
- common_local_url('postnotice'));
+ $this->elementStart('XRD', array('xmlns' => 'xri://$xrd*($v*2.0)',
+ 'xml:id' => 'oauth',
+ 'xmlns:simple' => 'http://xrds-simple.net/core/1.0',
+ 'version' => '2.0'));
+ $this->element('Type', null, 'xri://$xrds*simple');
+ $this->showService(OAUTH_ENDPOINT_REQUEST,
+ common_local_url('requesttoken'),
+ array(OAUTH_AUTH_HEADER, OAUTH_POST_BODY),
+ array(OAUTH_HMAC_SHA1),
+ $user->uri);
+ $this->showService(OAUTH_ENDPOINT_AUTHORIZE,
+ common_local_url('userauthorization'),
+ array(OAUTH_AUTH_HEADER, OAUTH_POST_BODY),
+ array(OAUTH_HMAC_SHA1));
+ $this->showService(OAUTH_ENDPOINT_ACCESS,
+ common_local_url('accesstoken'),
+ array(OAUTH_AUTH_HEADER, OAUTH_POST_BODY),
+ array(OAUTH_HMAC_SHA1));
+ $this->showService(OAUTH_ENDPOINT_RESOURCE,
+ null,
+ array(OAUTH_AUTH_HEADER, OAUTH_POST_BODY),
+ array(OAUTH_HMAC_SHA1));
+ $this->elementEnd('XRD');