Closed ghost closed 2 years ago
I am following the Genie tutorial: https://www.genieframework.com/docs/genie/tutorials/Developing-MVC-Web-Apps.html I have got to the 'Bonus' section, for implementing authentication. Have created a user table using SearchLite and created an admin user.
routes.jl: using Genie.Router, MoviesController, AdminController
route("/") do serve_static_file("welcome.html") end
route("/movies", MoviesController.index) route("/movies/search", MoviesController.search, named = :search_movies) route("/admin/movies", AdminController.index, named = :get_home)
AdminController: module AdminController
using GenieAuthentication, Genie.Renderer, Genie.Exceptions, Genie.Renderer.Html
function index() @authenticated! h1("Welcome Admin") |> html end
end
Browse to: http://127.0.0.1:8000/admin/movies I expect to be challenged for credentials. What I see is a blank screen, except for 'Redirecting you to'
Julia version: 1.7.3 Genie version: 4.18.1 Genie Authentication version 1.2.0
I am following the Genie tutorial: https://www.genieframework.com/docs/genie/tutorials/Developing-MVC-Web-Apps.html I have got to the 'Bonus' section, for implementing authentication. Have created a user table using SearchLite and created an admin user.
routes.jl: using Genie.Router, MoviesController, AdminController
route("/") do serve_static_file("welcome.html") end
route("/movies", MoviesController.index) route("/movies/search", MoviesController.search, named = :search_movies) route("/admin/movies", AdminController.index, named = :get_home)
AdminController: module AdminController
using GenieAuthentication, Genie.Renderer, Genie.Exceptions, Genie.Renderer.Html
function index() @authenticated! h1("Welcome Admin") |> html end
end
Browse to: http://127.0.0.1:8000/admin/movies I expect to be challenged for credentials. What I see is a blank screen, except for 'Redirecting you to'
Julia version: 1.7.3 Genie version: 4.18.1 Genie Authentication version 1.2.0