Skip to main content

Ralsina.Me — Roberto Alsina's website

Juno and middleware

This is how you add ba­sic au­then­ti­ca­tion to your Juno ap­p:

init({
    'middleware':[('paste.auth.basic.AuthBasicHandler',
                      {'realm':'Admin',
                       'authfunc':valid_user})],
    })

Where valid_us­er is the ob­vi­ous func­tion that takes user/­pass and re­turns true/­false.

Not ex­act­ly a so­phis­ti­cat­ed role-based au­th, but I don't need that for my app (L­DAP's ac­cess con­trols take care of it).


Contents © 2000-2024 Roberto Alsina