Easy universal authentication for clients in Julia.
Author ChifiSource
2 Stars
Updated Last
1 Year Ago
Started In
July 2022
universal authentication for toolips

Authentication has long been a daunting and problematic task for many developers, but this is no more with toolips. Using this extension, we can create different experiences for different groups just by writing different functions!

  • step 1: add toolips auth to your webapp:
using Toolips
using Pkg

  • step 2: add toolips auth to your extension vector:
routes = [route("/", home), fourofour]
extensions = Vector{ServerExtension}([Logger(), Files(), Session(), Auth()])
  • step 3: use toolips auth. The group method is passed a Connection, String, and Function to produce the high-level syntax. clients are grouped as 'new' by default.
function home(c::Connection)
    group(c, "user") do c::Connection
        write!(c, "this is the user page")
    group(c, "new") do c::Connection
        group!(c, "user", reset = true)
        write!(c, "you are now a user!, click below to reload!")
        b = button("reload", text = "reload")
        on(c, b, "click") do cm::ComponentModifier
            redirect!(cm, "/")
        write!(c, [br(), b])

Used By Packages

No packages found.