auth.rb 1.1 KB

12345678910111213141516171819202122
  1. Zammad::Application.routes.draw do
  2. api_path = Rails.configuration.api_path
  3. # omniauth
  4. match '/auth/:provider/callback', to: 'sessions#create_omniauth', via: [:post, :get, :puts, :delete]
  5. # sso
  6. match '/auth/sso', to: 'sessions#create_sso', via: [:post, :get]
  7. # sessions
  8. match api_path + '/signin', to: 'sessions#create', via: :post
  9. match api_path + '/signshow', to: 'sessions#show', via: [:get, :post]
  10. match api_path + '/signout', to: 'sessions#destroy', via: [:get, :delete]
  11. match api_path + '/available', to: 'sessions#available', via: :get
  12. match api_path + '/sessions/switch/:id', to: 'sessions#switch_to_user', via: :get
  13. match api_path + '/sessions/switch_back', to: 'sessions#switch_back_to_user', via: :get
  14. match api_path + '/sessions', to: 'sessions#list', via: :get
  15. match api_path + '/sessions/:id', to: 'sessions#delete', via: :delete
  16. end