auth.rb 1.2 KB

1234567891011121314151617181920212223
  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: %i[post get puts delete]
  5. match '/auth/failure', to: 'sessions#failure_omniauth', via: %i[post get]
  6. # sso
  7. match '/auth/sso', to: 'sessions#create_sso', via: %i[post get]
  8. # sessions
  9. match api_path + '/signin', to: 'sessions#create', via: :post
  10. match api_path + '/signshow', to: 'sessions#show', via: %i[get post]
  11. match api_path + '/signout', to: 'sessions#destroy', via: %i[get delete]
  12. match api_path + '/available', to: 'sessions#available', via: :get
  13. match api_path + '/sessions/switch/:id', to: 'sessions#switch_to_user', via: :get
  14. match api_path + '/sessions/switch_back', to: 'sessions#switch_back_to_user', via: :get
  15. match api_path + '/sessions', to: 'sessions#list', via: :get
  16. match api_path + '/sessions/:id', to: 'sessions#delete', via: :delete
  17. end