auth.rb 1.2 KB

12345678910111213141516171819202122232425
  1. # Copyright (C) 2012-2023 Zammad Foundation, https://zammad-foundation.org/
  2. Zammad::Application.routes.draw do
  3. api_path = Rails.configuration.api_path
  4. # omniauth
  5. match '/auth/:provider/callback', to: 'sessions#create_omniauth', via: %i[post get puts delete]
  6. match '/auth/failure', to: 'sessions#failure_omniauth', via: %i[post get]
  7. # sso
  8. match '/auth/sso', to: 'sessions#create_sso', via: %i[get post]
  9. # sessions
  10. match api_path + '/signin', to: 'sessions#create', via: :post
  11. match api_path + '/signshow', to: 'sessions#show', via: %i[get post]
  12. match api_path + '/signout', to: 'sessions#destroy', via: %i[get delete]
  13. match api_path + '/available', to: 'sessions#available', via: :get
  14. match api_path + '/sessions/switch/:id', to: 'sessions#switch_to_user', via: :get
  15. match api_path + '/sessions/switch_back', to: 'sessions#switch_back_to_user', via: :get
  16. match api_path + '/sessions', to: 'sessions#list', via: :get
  17. match api_path + '/sessions/:id', to: 'sessions#delete', via: :delete
  18. end