~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/canonical/auth/browser.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2004-11-16 15:29:35 UTC
  • mfrom: (unknown (missing))
  • Revision ID: Arch-1:rocketfuel@canonical.com%launchpad--devel--0--patch-794
Reorganisation and clean-up of placeless auth and security.
Patches applied:

 * steve.alexander@canonical.com/launchpad--devel--0--patch-150
   refuel

 * steve.alexander@canonical.com/launchpad--devel--0--patch-151
   tidied up the placeless auth code.

 * steve.alexander@canonical.com/launchpad--devel--0--patch-152
   moved authorization module containing the security policy code into webapp.

 * steve.alexander@canonical.com/launchpad--devel--0--patch-153
   removed decoy sourceutility.py

 * steve.alexander@canonical.com/launchpad--devel--0--patch-154
   reorg of placeless auth code in preparation for it to me moved to c.l.webapp.  Removal of most explicit use of SSHADigestEncryptor to use an IPasswordEncryptor utility instead.

 * steve.alexander@canonical.com/launchpad--devel--0--patch-155
   fix bad import in authorization.py.  improve comments

 * steve.alexander@canonical.com/launchpad--devel--0--patch-156
   refuel

 * steve.alexander@canonical.com/launchpad--devel--0--patch-157
   removed test for previously removed decoy module

 * steve.alexander@canonical.com/launchpad--devel--0--patch-158
   refuel

 * steve.alexander@canonical.com/launchpad--devel--0--patch-159
   fixed typo

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
import re
8
8
 
9
9
from canonical.launchpad.database import EmailAddress
 
10
from canonical.launchpad.interfaces import IPasswordEncryptor
10
11
from canonical.auth import AuthApplication
11
 
from canonical.lp.placelessauth.encryption import SSHADigestEncryptor
12
12
from canonical.zodb import zodbconnection
13
13
 
14
14
# Note that this appears as "valid email" in the UI, because that term is
120
120
                        person = False
121
121
 
122
122
                    if person:
123
 
                        ssha = SSHADigestEncryptor()
124
 
                        person.password = ssha.encrypt(self.password)
 
123
                        encryptor = getUtility(IPasswordEncryptor)
 
124
                        person.password = encryptor.encrypt(self.password)
 
125
 
125
126
                        self.success = True
126
127
                        return 'Your password has successfully been reset.'
127
128