Mercurial > hg > bitsyauth
comparison bitsyauth/__init__.py @ 18:814ed3208afa
whitespace
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Thu, 17 Nov 2011 11:04:36 -0800 |
parents | d5f44b38826d |
children | aac4a4ea70a7 |
comparison
equal
deleted
inserted
replaced
17:d5f44b38826d | 18:814ed3208afa |
---|---|
332 if not errors: # create a new user | 332 if not errors: # create a new user |
333 self.newuser(name, | 333 self.newuser(name, |
334 self.hash(name, self.request.POST['Password'])) | 334 self.hash(name, self.request.POST['Password'])) |
335 self.request.environ['REMOTE_USER'] = name # login the new user | 335 self.request.environ['REMOTE_USER'] = name # login the new user |
336 self.request.environ['paste.auth_tkt.set_user'](name) | 336 self.request.environ['paste.auth_tkt.set_user'](name) |
337 | 337 |
338 return errors | 338 return errors |
339 | 339 |
340 class BitsyAuth(object): | 340 class BitsyAuth(object): |
341 """outer middleware for auth; does the cookie handling and wrapping""" | 341 """outer middleware for auth; does the cookie handling and wrapping""" |
342 | 342 |
343 def __init__(self, app, global_conf, passwords, newuser, site='', secret='secret'): | 343 def __init__(self, app, global_conf, passwords, newuser, site='', secret='secret'): |
344 self.app = app | 344 self.app = app |
345 self.path = '/logout' | 345 self.path = '/logout' |
346 self.cookie = '__ac' | 346 self.cookie = '__ac' |
347 auth = BitsyAuthInnerWare(app, passwords=passwords, newuser=newuser, site=site) | 347 auth = BitsyAuthInnerWare(app, passwords=passwords, newuser=newuser, site=site) |