summaryrefslogtreecommitdiff
path: root/actions/xrds.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@prodromou.name>2008-05-26 09:15:51 -0400
committerEvan Prodromou <evan@prodromou.name>2008-05-26 09:15:51 -0400
commit92af6565b684731ecbb8d85f8c79060b3645461c (patch)
tree23b251654ca1ec5306b583a22054650d768beecb /actions/xrds.php
parentcf964c199c04d30c85a8cb2574218346df94ca32 (diff)
fixups for xrds
Corrected the definition of showService to show all the parameters. Fixed the localID part so it uses $user->uri; getUri() was throwing an error. darcs-hash:20080526131551-84dde-ab31c6cbfe2bce62aa1573ad9be9a916984e37b3.gz
Diffstat (limited to 'actions/xrds.php')
-rw-r--r--actions/xrds.php23
1 files changed, 18 insertions, 5 deletions
diff --git a/actions/xrds.php b/actions/xrds.php
index be1244bb3..ad78e86b2 100644
--- a/actions/xrds.php
+++ b/actions/xrds.php
@@ -63,13 +63,13 @@ class XrdsAction extends Action {
common_local_url('requesttoken'),
array(OAUTH_AUTH_HEADER, OAUTH_POST_BODY),
array(OAUTH_HMAC_SHA1),
- $user->getUri());
+ $user->uri);
$this->show_service(OAUTH_ENDPONT_AUTHORIZE,
common_local_url('userauthorization'),
array(OAUTH_AUTH_HEADER, OAUTH_POST_BODY),
array(OAUTH_HMAC_SHA1),
- $user->getUri());
+ $user->uri);
$this->show_service(OAUTH_ENDPONT_ACCESS,
common_local_url('accesstoken'),
@@ -116,10 +116,23 @@ class XrdsAction extends Action {
common_end_xml();
}
- function show_service($type, $uri, $params=NULL, $signature=NULL, $localId=NULL) {
+ function show_service($type, $uri, $params=NULL, $sigs=NULL, $localId=NULL) {
common_element_start('Service');
- common_element('Type', $type);
- common_element('URI', $uri);
+ common_element('URI', NULL, $uri);
+ common_element('Type', NULL, $type);
+ if ($params) {
+ foreach ($params as $param) {
+ common_element('Type', NULL, $param);
+ }
+ }
+ if ($sigs) {
+ foreach ($sigs as $sig) {
+ common_element('Type', NULL, $sig);
+ }
+ }
+ if ($localId) {
+ common_element('LocalID', NULL, $localID);
+ }
common_element_end('Service');
}
} \ No newline at end of file