GenieAuthentication.jl
GenieAuthentication.jl copied to clipboard
How to access current_user in side custom controller?
I can't do this:
module AdminController
using GenieAuthentication, Genie.Renderer, Genie.Exceptions, Genie.Renderer.Html
function index()
authenticated!()
# h1("Welcome Admin") |> html
current_user().name
end
end
But in a routes.jl file I can do this
route("/auth") do
current_user().name
end