summaryrefslogtreecommitdiff
path: root/lib/router.php
diff options
context:
space:
mode:
authorZach Copley <zach@status.net>2010-01-10 21:35:46 -0800
committerZach Copley <zach@status.net>2010-01-24 16:36:02 -0800
commite9e448bcee69b0c39badf353faedb4c29af3f502 (patch)
treea484d76bbc25380e497319d92b69b599aa7c3de4 /lib/router.php
parentfa81a580bb9eea76e7739f37010b35e4b919f410 (diff)
Workflow for request tokens and authorizing request tokens
Diffstat (limited to 'lib/router.php')
-rw-r--r--lib/router.php19
1 files changed, 8 insertions, 11 deletions
diff --git a/lib/router.php b/lib/router.php
index 0703d7597..420f5a0a1 100644
--- a/lib/router.php
+++ b/lib/router.php
@@ -50,7 +50,8 @@ class Router
var $m = null;
static $inst = null;
static $bare = array('requesttoken', 'accesstoken', 'userauthorization',
- 'postnotice', 'updateprofile', 'finishremotesubscribe');
+ 'postnotice', 'updateprofile', 'finishremotesubscribe',
+ 'apioauthrequesttoken', 'apioauthaccesstoken');
static function get()
{
@@ -144,7 +145,7 @@ class Router
'email', 'sms', 'userdesign', 'other') as $s) {
$m->connect('settings/'.$s, array('action' => $s.'settings'));
}
-
+
// search
foreach (array('group', 'people', 'notice') as $s) {
@@ -640,11 +641,11 @@ class Router
array('action' => $a),
array('nickname' => '[a-zA-Z0-9]{1,64}'));
}
-
- $m->connect(':nickname/apps',
+
+ $m->connect(':nickname/apps',
array('action' => 'apps'),
array('nickname' => '['.NICKNAME_FMT.']{1,64}'));
- $m->connect(':nickname/apps/show/:id',
+ $m->connect(':nickname/apps/show/:id',
array('action' => 'showapplication'),
array('nickname' => '['.NICKNAME_FMT.']{1,64}',
'id' => '[0-9]+')
@@ -652,18 +653,14 @@ class Router
$m->connect(':nickname/apps/new',
array('action' => 'newapplication'),
array('nickname' => '['.NICKNAME_FMT.']{1,64}'));
- $m->connect(':nickname/apps/edit/:id',
+ $m->connect(':nickname/apps/edit/:id',
array('action' => 'editapplication'),
array('nickname' => '['.NICKNAME_FMT.']{1,64}',
'id' => '[0-9]+')
);
- $m->connect('oauth/request_token',
- array('action' => 'apioauthrequesttoken'));
- $m->connect('oauth/access_token',
- array('action' => 'apioauthaccesstoken'));
$m->connect('oauth/authorize',
- array('action' => 'apioauthauthorize'));
+ array('action' => 'apioauthauthorize'));
foreach (array('subscriptions', 'subscribers') as $a) {
$m->connect(':nickname/'.$a.'/:tag',