Hello,
I had a similar problem too.
In config/midleware.py add:

    # 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)

    if asbool(full_stack):
        # Handle Python exceptions
        app = ErrorHandler(app, global_conf, **config['pylons.errorware'])
       * app = AddToEnviron(app, 'authkit.users', h.auth.user)*
        app = authkit.authenticate.middleware(app, app_conf)

        # 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])


In auth.py:
    user = UsersFromDatabase(model)

I'll hope I helped for you.

2011/3/14 Sandor Gonzalez <[email protected]>

> Hi everyone,
> I've got an app that's working fine with Pylons 0.9.7 ( I know it's old)
> and AuthKit 0.4.5. I'm recently trying to upgrade the app to use Pylons 1.0.
> However, the authentication is not working. The variable
> environ['REMOTE_USER'] never gets set.
> I've even tried the examples at http://pylonsbook.c app =
> AddToEnviron(app, 'authkit.users',
> h.auth.user)om/en/1.1/authentication-and-authorization.html<http://pylonsbook.com/en/1.1/authentication-and-authorization.html>with
>  no success. I also tried installing Pylons 0.9.7 but the issue remains,
> as it seems that my new installation uses a package which version is
> superior to the one I've got running in my production Pylons 0.9.7
> (installed some months ago).
> Any ideas?
> Thanks!
>
> --
> You received this message because you are subscribed to the Google Groups
> "pylons-discuss" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/pylons-discuss?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to