]> git.openstreetmap.org Git - rails.git/blobdiff - config/routes.rb
Adding initial version of the OAuth token authentication method. This adds basic...
[rails.git] / config / routes.rb
index f2d64471900dc3142beaa378240dce829ca8d4b5..8789c8437a7f706d3cab99c4b5346572258257ca 100644 (file)
@@ -85,6 +85,7 @@ ActionController::Routing::Routes.draw do |map|
   map.connect '/browse/changesets', :controller => 'changeset', :action => 'list'
   
   # web site
+  map.root :controller => 'site', :action => 'index'
   map.connect '/', :controller => 'site', :action => 'index'
   map.connect '/edit', :controller => 'site', :action => 'edit'
   map.connect '/history', :controller => 'changeset', :action => 'list_bbox'
@@ -171,14 +172,21 @@ ActionController::Routing::Routes.draw do |map|
   map.connect '/export/finish', :controller => 'export', :action => 'finish'
 
   # messages
-
   map.connect '/user/:display_name/inbox', :controller => 'message', :action => 'inbox'
   map.connect '/user/:display_name/outbox', :controller => 'message', :action => 'outbox'
-  map.connect '/message/new/:user_id', :controller => 'message', :action => 'new'
+  map.connect '/message/new/:display_name', :controller => 'message', :action => 'new'
   map.connect '/message/read/:message_id', :controller => 'message', :action => 'read'
   map.connect '/message/mark/:message_id', :controller => 'message', :action => 'mark'
   map.connect '/message/reply/:message_id', :controller => 'message', :action => 'reply'
 
+  # oauth admin pages (i.e: for setting up new clients, etc...)
+  map.resources :oauth_clients
+  map.connect '/oauth/revoke', :controller => 'oauth', :action => 'revoke'
+  map.authorize '/oauth/authorize', :controller => 'oauth', :action => 'oauthorize'
+  map.request_token '/oauth/request_token', :controller => 'oauth', :action => 'request_token'
+  map.access_token '/oauth/access_token', :controller => 'oauth', :action => 'access_token'
+  map.test_request '/oauth/test_request', :controller => 'oauth', :action => 'test_request'
+
   # fall through
   map.connect ':controller/:id/:action'
   map.connect ':controller/:action'