[Koha-bugs] [Bug 24539] Build generic authentication module interface
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Wed Jun 2 11:05:11 CEST 2021
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24539
--- Comment #19 from David Cook <dcook at prosentient.com.au> ---
(In reply to David Cook from comment #18)
> (In reply to David Cook from comment #17)
> > Perhaps next week I can put together an OpenID Connect module. It might be
> > tricky to do as a Koha Plugin, since checkauth() is based on CGI.pm and that
> > doesn't play nicely with Mojolicious... although maybe $c will be in scope.
>
> Darn. I just did a little test, and $c is not in scope for do_login when
> called within checkauth() from a Mojolicious controller.
>
> I do have another idea which is so hacky. In the koha-plugin-test-auth, I
> redirect STDOUT and STDERR to /dev/null, but I could actually redirect
> STDOUT to a scalar variable, and then I could parse the output and translate
> it to Mojolicious...
>
> Rather than hacking apart Koha's existing functions, it might be a better
> idea to refactor checkauth() so that it's comprised of separate login and
> logout functions, which can be called in a more environmentally aware way.
>
> Anyway, definitely calling it a night...
Actually, the better way to do it would be to focus on the concept of
authenticated sessions. You could have a Koha Plugin perform a login however it
wants, and it just ends up with a session. It then redirects or whatever and
sets the session cookie. Then it's all good.
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list