I am trying to set up an application with custom login form, so I am
using forward method. However when authorizing an action with
'ValidAuthKitUser' permission I get 'no_authkit_users_in_environ'
exception. I see in the code, that this field in environ is
automatically set up in some other methods but not in forward. Where
should I set it up?
Best regards,
zefciu
James
authkit.enable = true
authkit.setup.method = forward,cookie
authkit.forward.authenticate.user.type = maniabiegania.lib.users:Users
authkit.form.signinpath = /login
authkit.cookie.signoutpath = /logout
authkit.cookie.secret = GagsUbwodek8
authkit.cookie.name = authkit
My make_app in middleware.py is:
def make_app(global_conf, full_stack=True, static_files=True, **app_conf):
# Configure the Pylons environment
load_environment(global_conf, app_conf)
# The Pylons WSGI app
app = PylonsApp()
# Routing/Session/Cache Middleware
app = RoutesMiddleware(app, config['routes.map'])
app = SessionMiddleware(app, config)
app = CacheMiddleware(app, config)
# CUSTOM MIDDLEWARE HERE (filtered by error handling middlewares)
app = authkit.authenticate.middleware(app, app_conf)
if asbool(full_stack):
# Handle Python exceptions
app = ErrorHandler(app, global_conf, **config['pylons.errorware'])
# Display error documents for 401, 403, 404 status codes (and
# 500 when debug is disabled)
if asbool(config['debug']):
app = StatusCodeRedirect(app)
else:
app = StatusCodeRedirect(app, [400, 401, 403, 404, 500])
# Establish the Registry for this application
app = RegistryManager(app)
if asbool(static_files):
# Serve static files
static_app = StaticURLParser(config['pylons.paths']['static_files'])
app = Cascade([static_app, app])
return app
2010/3/11 James Gardner <ja...@pythonweb.org>:
> --
> You received this message because you are subscribed to the Google Groups "AuthKit" group.
> To post to this group, send email to aut...@googlegroups.com.
> To unsubscribe from this group, send email to authkit+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/authkit?hl=en.
>
>
--
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS/S d+(-)>- s+++:-- a- C++(+) UL P--- L+++(++) E--- W++(+)$ N+ o K--
w-- !O M- V- PS-- PE++ Y+ PGP+ t 5 X R(-) tv b+ DI+() D- G e+++
h!>---- r++>+++ y?
------END GEEK CODE BLOCK------
authkit.enable = true
authkit.setup.method = forward,cookie
authkit.form.authenticate.user.type = maniabiegania.lib.users:Users
authkit.forward.signinpath = /login
authkit.cookie.signoutpath = /logout
authkit.cookie.secret = CaxeatUfwondAgUgOcHesjabPijNeShnevAwcycs
authkit.cookie.name = authkit
zefciu