Current section

Files

Jump to
openmaize priv templates phoenixauth router.ex
Raw

priv/templates/phoenixauth/router.ex

defmodule <%= base %>.Router do
use <%= base %>.Web, :router
pipeline :browser do
plug :accepts, ["html"]
plug :fetch_session
plug :fetch_flash
plug :protect_from_forgery
plug :put_secure_browser_headers
plug Openmaize.Authenticate
end
scope "/", <%= base %> do
pipe_through :browser
get "/", PageController, :index
resources "/users", UserController
resources "/sessions", SessionController, only: [:new, :create, :delete]<%= if confirm do %>
get "/sessions/confirm_email", SessionController, :confirm_email
resources "/password_resets", PasswordResetController, only: [:new, :create, :edit, :update]<% end %>
end
end