Changeset View
Changeset View
Standalone View
Standalone View
web/router.ex
defmodule KolabChat.Router do | defmodule KolabChat.Router do | ||||
use KolabChat.Web, :router | use KolabChat.Web, :router | ||||
pipeline :browser do | pipeline :browser do | ||||
plug :accepts, ["html"] | plug :accepts, ["html"] | ||||
plug :fetch_session | plug :fetch_session | ||||
plug :fetch_flash | plug :fetch_flash | ||||
plug :protect_from_forgery | plug :protect_from_forgery | ||||
plug :put_secure_browser_headers | plug :put_secure_browser_headers | ||||
plug KolabChat.Plugs.SetUser | |||||
end | end | ||||
pipeline :api do | pipeline :api do | ||||
plug :accepts, ["json"] | plug :accepts, ["json"] | ||||
end | end | ||||
scope "/", KolabChat do | scope "/", KolabChat do | ||||
pipe_through :browser # Use the default browser stack | pipe_through :browser # Use the default browser stack | ||||
get "/", PageController, :index | get "/", PageController, :index | ||||
end | end | ||||
scope "/auth", KolabChat do | |||||
pipe_through :browser | |||||
post "/default/callback", AuthController, :default_callback | |||||
get "/logout", AuthController, :logout | |||||
end | |||||
# Other scopes may use custom stacks. | # Other scopes may use custom stacks. | ||||
# scope "/api", KolabChat do | # scope "/api", KolabChat do | ||||
# pipe_through :api | # pipe_through :api | ||||
# end | # end | ||||
end | end |