repoze.who: perform login programmatically

It took me a while to find out how to perform programmatic login using repoze.who.here is the source code:

rememberer = request.environ['repoze.who.plugins']['cookie']
identity = {'repoze.who.userid': user.username}
response.headerlist = response.headerlist + \
	rememberer.remember(request.environ, identity) 
Related posts:

TAGS:


5 Comments »

WP Themes On August 10th, 2010 at 1:08 pm (#)

Good brief and this post helped me alot in my college assignement. Gratefulness you as your information.

WP Themes On July 25th, 2010 at 9:08 pm (#)

Genial dispatch and this enter helped me alot in my college assignement. Thank you seeking your information.

medical technologist On July 10th, 2010 at 12:33 pm (#)

Great site. A lot of useful information here. I’m sending it to some friends!

发现IE路 On July 9th, 2010 at 10:22 am (#)

发现IE路http://www.faxie6.com,征求友情链接,

TOSO On July 8th, 2010 at 9:31 pm (#)

呵呵,博客风格不错,订阅了!


Leave a comment


(will not be published)