custom login function troubles

7 views
Skip to first unread message

Chris Curvey

unread,
Aug 13, 2008, 2:34:24 PM8/13/08
to AuthKit
this can't be as hard as it seems...

I have authentication/authorization working with Pylons, AuthKit and
Elixir.
Now I want to add a custom authentication routine. Here is my authkit
configuration from development.ini:

authkit.setup.method = form,cookie
authkit.form.authenticate.user.type =
trackmgr.users.elixir_driver:UsersFromDatabase
authkit.form.authenticate.user.data = trackmgr.model
authkit.cookie.secret = secret string
authkit.cookie.signoutpath = /auth/signout
authkit.form.template.obj=trackmgr.controllers.Login:loginForm

# CCC 7/31/08 -- custom login function
authkit.form.authenticate.function=trackmgr.controllers.Login:valid_password

But whenever I try to call a page when not logged in, I get

No authkit.users object exists in the environment. You may have
forgotton to specify a Users object or are using the the default
valid_password() method in the authenticate middleware when you may
have meant to specify your own.

So I tried a few flavors of adding "authkit.users=" to my
configuration, but nothing seems to take.

Anyone got a recipe for this?

Rick Flosi

unread,
Aug 13, 2008, 2:41:10 PM8/13/08
to aut...@googlegroups.com
I ran into a similar problem.

Try commenting out your `authkit.form.authenticate.user.data` config option.

-r.
--
http://twitter.com/rpf
http://rickflosi.blogspot.com/

"The issue is always the same: the government or the market. There is no third solution." - Ludwig von Mises, Planned Chaos

"Capitalism tends toward a productive orientation when the capitalist entrepreneurs can neither use coercion for the purpose of parasitic exploitation, nor are so devoid of strength as to be exposed to exploitation themselves -- in other words, when businessmen are too weak to prey upon the other classes, but too strong to be preyed upon. Such a situation -- which in my previous books I proposed to call equidependency -- requires a certain degree of balance of power between the business elite and the political elite. An important application of the principle of equidependency is that capitalism can function beneficently only in a society where money cannot buy everything, because if it can, then the power of wealth can have no counterweight and a parasitic involution ensues." - Stanislav Andreski
Reply all
Reply to author
Forward
0 new messages