2021-06-01 12:20:20 +00:00
|
|
|
# Copyright (C) 2012-2021 Zammad Foundation, http://zammad-foundation.org/
|
|
|
|
|
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
|
2017-11-23 08:09:44 +00:00
|
|
|
match '/auth/:provider/callback', to: 'sessions#create_omniauth', via: %i[post get puts delete]
|
2018-07-17 08:35:51 +00:00
|
|
|
match '/auth/failure', to: 'sessions#failure_omniauth', via: %i[post get]
|
2012-11-22 14:40:36 +00:00
|
|
|
|
2019-09-30 17:34:13 +00:00
|
|
|
# sso
|
|
|
|
match '/auth/sso', to: 'sessions#create_sso', via: %i[get post]
|
|
|
|
|
2013-08-21 19:16:42 +00:00
|
|
|
# sessions
|
2015-04-27 13:42:53 +00:00
|
|
|
match api_path + '/signin', to: 'sessions#create', via: :post
|
2017-11-23 08:09:44 +00:00
|
|
|
match api_path + '/signshow', to: 'sessions#show', via: %i[get post]
|
|
|
|
match api_path + '/signout', to: 'sessions#destroy', via: %i[get delete]
|
2012-11-22 14:40:36 +00:00
|
|
|
|
2016-05-26 21:40:10 +00:00
|
|
|
match api_path + '/available', to: 'sessions#available', via: :get
|
|
|
|
|
2015-04-27 13:42:53 +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
|
|
|
|
2015-04-27 14:15:29 +00:00
|
|
|
end
|