hello friends,

thanks again for repoze.*

one question: i've seen an api login method for repoze 2.

from repoze.who.api import get_api
who_api = get_api(request.environ)
authenticated, headers = \
        who_api.login(dict(login=Login, password=UserPass))

how could i login a user in a program using repoze 1?

i came up with the following solution, but is it the best way to go?

plugins = request.environ.get('repoze.who.plugins').values()
rememberers = [auth for auth in plugins if hasattr(auth, 'remember')]

res = rememberers and \
        rememberers[0].remember(request.environ, dict(login=Login, 

best regards,
Repoze-dev mailing list

Reply via email to