Hello,
Basically, once you create an instance of the Redis source adapter for
repoze.what [1], you need to pass it to the repoze.what middleware.
The following illustrates how it could be done:
"""
from redis import Redis
from repoze.what.middleware import setup_auth
from repoze.what.plugins.redis import adapters
def make_app(....):
# ...
# PUT WSGI MIDDLEWARE UNDER THIS LINE
# Configuring repoze.what:
redis_groups = adapters.RedisGroupAdapter(Redis())
redis_permissions = adapters.RedisPermissionAdapter(Redis())
groups = {'redis': redis_groups}
permissions = {'redis': redis_permissions}
app = setup_auth(app, groups, permissions, ...)
"""
AFAIK there's no authenticator plugin for repoze.who, though. You can
either use another storage mechanism for authentication, or write a
simple Redis-based repoze.who authenticator plugin [3].
You may find the following links useful too:
http://wiki.pylonshq.com/display/pylonscookbook/Authorization+with+repoze.what
http://what.repoze.org/docs/1.0/Manual/GettingStarted.html
HTH. :)
- Gustavo.
[1] http://pypi.python.org/pypi/repoze.what.plugins.redis/1.0rc1
[2] http://tinyurl.com/repoze-auth-no-quickstart
[3] http://docs.repoze.org/who/1.0/narr.html#writing-an-authenticator-plugin
On Jul 5, 4:24 pm, Gopalakrishnan S
<[email protected]> wrote:
> Hi,
>
> I want to use the redis as my database backend and repoze.what and
> repoze.who for user login. I could not identify the right application
> which uses redis and repoze with pylons.
>
> There is repoze.what.plugins.redis plugins availble, but I don't know
> to use it.
>
> Please help me out.
>
> Regards,
>
> Krish
--
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.