2013-08-21 19:16:42 +00:00
|
|
|
Zammad::Application.routes.draw do
|
|
|
|
api_path = Rails.configuration.api_path
|
2012-05-18 13:54:48 +00:00
|
|
|
|
2013-08-21 19:16:42 +00:00
|
|
|
# omniauth
|
2014-09-15 20:55:06 +00:00
|
|
|
match '/auth/:provider/callback', :to => 'sessions#create_omniauth', :via => [:post, :get, :puts, :delete]
|
2012-11-22 14:40:36 +00:00
|
|
|
|
2013-08-21 19:16:42 +00:00
|
|
|
# sso
|
2014-09-15 20:55:06 +00:00
|
|
|
match '/auth/sso', :to => 'sessions#create_sso', :via => [:post, :get]
|
2013-02-17 18:28:32 +00:00
|
|
|
|
2013-08-21 19:16:42 +00:00
|
|
|
# sessions
|
2014-09-15 20:55:06 +00:00
|
|
|
match api_path + '/signin', :to => 'sessions#create', :via => :post
|
|
|
|
match api_path + '/signshow', :to => 'sessions#show', :via => :get
|
|
|
|
match api_path + '/signout', :to => 'sessions#destroy', :via => [:get, :delete]
|
2012-11-22 14:40:36 +00:00
|
|
|
|
2014-09-15 20:55:06 +00:00
|
|
|
match api_path + '/sessions/switch/:id', :to => 'sessions#switch_to_user', :via => :get
|
|
|
|
match api_path + '/sessions/switch_back', :to => 'sessions#switch_back_to_user', :via => :get
|
|
|
|
match api_path + '/sessions', :to => 'sessions#list', :via => :get
|
|
|
|
match api_path + '/sessions/:id', :to => 'sessions#delete', :via => :delete
|
2013-08-21 19:16:42 +00:00
|
|
|
|
|
|
|
end
|