connect user authentication to API client authorization
[arvados.git] / config / routes.rb
1 Server::Application.routes.draw do
2   resources :api_client_authorizations
3
4   resources :api_clients
5
6   resources :logs
7   resources :projects
8   resources :specimens
9   resources :collections
10   resources :metadata
11   resources :nodes
12   resources :pipelines
13   resources :pipeline_invocations
14
15   # The priority is based upon order of creation:
16   # first created -> highest priority.
17
18   # Sample of regular route:
19   #   match 'products/:id' => 'catalog#view'
20   # Keep in mind you can assign values other than :controller and :action
21
22   # Sample of named route:
23   #   match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
24   # This route can be invoked with purchase_url(:id => product.id)
25
26   # Sample resource route (maps HTTP verbs to controller actions automatically):
27   #   resources :products
28
29   # Sample resource route with options:
30   #   resources :products do
31   #     member do
32   #       get 'short'
33   #       post 'toggle'
34   #     end
35   #
36   #     collection do
37   #       get 'sold'
38   #     end
39   #   end
40
41   # Sample resource route with sub-resources:
42   #   resources :products do
43   #     resources :comments, :sales
44   #     resource :seller
45   #   end
46
47   # Sample resource route with more complex sub-resources
48   #   resources :products do
49   #     resources :comments
50   #     resources :sales do
51   #       get 'recent', :on => :collection
52   #     end
53   #   end
54
55   # Sample resource route within a namespace:
56   #   namespace :admin do
57   #     # Directs /admin/products/* to Admin::ProductsController
58   #     # (app/controllers/admin/products_controller.rb)
59   #     resources :products
60   #   end
61
62   # You can have the root of your site routed with "root"
63   # just remember to delete public/index.html.
64   # root :to => 'welcome#index'
65
66   # See how all your routes lay out with "rake routes"
67
68   # This is a legacy wild controller route that's not recommended for RESTful applications.
69   # Note: This route will make all actions in every controller accessible via GET requests.
70   # match ':controller(/:action(/:id(.:format)))'
71
72   namespace :orvos do
73     namespace :v1 do
74       resources :collections
75       resources :metadata
76       resources :nodes
77       resources :pipelines
78       resources :pipeline_invocations
79       resources :pipelineInvocations
80       resources :specimens
81       resources :projects
82       resources :logs
83       match '/schema' => 'schema#show'
84       match '/nodes/:uuid/ping' => 'nodes#ping', :as => :ping_node
85       match '/metadata/:tail_kind/:tail' => 'metadata#index'
86     end
87   end
88
89   # omniauth
90   match '/auth/:provider/callback', :to => 'user_sessions#create'
91   match '/auth/failure', :to => 'user_sessions#failure'
92
93   # Custom logout
94   match '/login', :to => 'user_sessions#login'
95   match '/logout', :to => 'user_sessions#logout'
96
97   # Send unroutable requests to an arbitrary controller
98   # (ends up at ApplicationController#render_not_found)
99   match '*a', :to => 'orvos/v1/metadata#render_not_found'
100
101   root :to => 'static#home'
102 end