launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #06102
[Merge] lp:~wgrant/launchpad/passwordless-testopenid into lp:launchpad
William Grant has proposed merging lp:~wgrant/launchpad/passwordless-testopenid into lp:launchpad with lp:~wgrant/launchpad/drop-emailaddress.account as a prerequisite.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~wgrant/launchpad/passwordless-testopenid/+merge/88810
testopenid still asks for a password (usually 'test'), despite the fact that Launchpad hasn't managed passwords for nearly two years. This branch removes the password requirement, allowing us to eventually remove AccountPassword.
--
https://code.launchpad.net/~wgrant/launchpad/passwordless-testopenid/+merge/88810
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~wgrant/launchpad/passwordless-testopenid into lp:launchpad.
=== modified file 'lib/lp/services/webapp/tests/cookie-authentication.txt'
--- lib/lp/services/webapp/tests/cookie-authentication.txt 2011-12-28 17:03:06 +0000
+++ lib/lp/services/webapp/tests/cookie-authentication.txt 2012-01-17 04:54:39 +0000
@@ -27,7 +27,7 @@
>>> from lp.services.webapp.tests.test_login import (
... fill_login_form_and_submit)
- >>> fill_login_form_and_submit(browser, 'foo.bar@xxxxxxxxxxxxx', 'test')
+ >>> fill_login_form_and_submit(browser, 'foo.bar@xxxxxxxxxxxxx')
>>> print extract_text(find_tag_by_id(browser.contents, 'logincontrol'))
Foo Bar (name16) ...
=== modified file 'lib/lp/services/webapp/tests/login.txt'
--- lib/lp/services/webapp/tests/login.txt 2011-12-28 17:03:06 +0000
+++ lib/lp/services/webapp/tests/login.txt 2012-01-17 04:54:39 +0000
@@ -29,7 +29,7 @@
Login
>>> from lp.services.webapp.tests.test_login import (
... fill_login_form_and_submit)
- >>> fill_login_form_and_submit(browser, 'test@xxxxxxxxxxxxx', 'test')
+ >>> fill_login_form_and_submit(browser, 'test@xxxxxxxxxxxxx')
Once authenticated, we're redirected back to the page where we started, with
the query args preserved.
=== modified file 'lib/lp/services/webapp/tests/no-anonymous-session-cookies.txt'
--- lib/lp/services/webapp/tests/no-anonymous-session-cookies.txt 2011-12-28 17:03:06 +0000
+++ lib/lp/services/webapp/tests/no-anonymous-session-cookies.txt 2012-01-17 04:54:39 +0000
@@ -29,7 +29,7 @@
>>> from lp.services.webapp.tests.test_login import (
... fill_login_form_and_submit)
- >>> fill_login_form_and_submit(browser, 'foo.bar@xxxxxxxxxxxxx', 'test')
+ >>> fill_login_form_and_submit(browser, 'foo.bar@xxxxxxxxxxxxx')
>>> print extract_text(find_tag_by_id(browser.contents, 'logincontrol'))
Foo Bar (name16) ...
=== modified file 'lib/lp/services/webapp/tests/test_login.py'
--- lib/lp/services/webapp/tests/test_login.py 2012-01-05 00:23:45 +0000
+++ lib/lp/services/webapp/tests/test_login.py 2012-01-17 04:54:39 +0000
@@ -545,11 +545,10 @@
handler_classes['_redirect'] = MyHTTPRedirectHandler
-def fill_login_form_and_submit(browser, email_address, password):
+def fill_login_form_and_submit(browser, email_address):
assert browser.getControl(name='field.email') is not None, (
"We don't seem to be looking at a login form.")
browser.getControl(name='field.email').value = email_address
- browser.getControl(name='field.password').value = password
browser.getControl('Continue').click()
@@ -565,7 +564,7 @@
browser.getControl('Continue').click()
self.assertEquals('Login', browser.title)
- fill_login_form_and_submit(browser, 'test@xxxxxxxxxxxxx', 'test')
+ fill_login_form_and_submit(browser, 'test@xxxxxxxxxxxxx')
login_status = extract_text(
find_tag_by_id(browser.contents, 'logincontrol'))
self.assertIn('Sample Person (name12)', login_status)
=== modified file 'lib/lp/testopenid/browser/server.py'
--- lib/lp/testopenid/browser/server.py 2012-01-03 12:36:57 +0000
+++ lib/lp/testopenid/browser/server.py 2012-01-17 04:54:39 +0000
@@ -305,12 +305,12 @@
super(TestOpenIDLoginView, self).initialize()
def validate(self, data):
- """Check that the email address and password are valid for login."""
+ """Check that the email address is valid for login."""
loginsource = getUtility(IPlacelessLoginSource)
principal = loginsource.getPrincipalByLogin(data['email'])
- if principal is None or not principal.validate(data['password']):
+ if principal is None:
self.addError(
- _("Incorrect password for the provided email address."))
+ _("Unknown email address."))
@action('Continue', name='continue')
def continue_action(self, action, data):
=== modified file 'lib/lp/testopenid/interfaces/server.py'
--- lib/lp/testopenid/interfaces/server.py 2012-01-01 02:58:52 +0000
+++ lib/lp/testopenid/interfaces/server.py 2012-01-17 04:54:39 +0000
@@ -11,7 +11,6 @@
from zope.interface import Interface
from zope.schema import TextLine
-from lp.services.fields import PasswordField
from lp.services.openid.interfaces.openid import IOpenIDPersistentIdentity
from lp.services.webapp.interfaces import ILaunchpadApplication
from lp.services.webapp.url import urlappend
@@ -24,7 +23,6 @@
class ITestOpenIDLoginForm(Interface):
email = TextLine(title=u'What is your e-mail address?', required=True)
- password = PasswordField(title=u'Password', required=True)
class ITestOpenIDPersistentIdentity(IOpenIDPersistentIdentity):
=== modified file 'lib/lp/testopenid/stories/basics.txt'
--- lib/lp/testopenid/stories/basics.txt 2010-02-12 15:34:28 +0000
+++ lib/lp/testopenid/stories/basics.txt 2012-01-17 04:54:39 +0000
@@ -55,9 +55,9 @@
checkid_setup Mode
==================
-When we go to the OpenID setup URL, we are presented with a login
-form. By entering an email address and password, we are directed back
-to the consumer, completing the OpenID request:
+When we go to the OpenID setup URL, we are presented with a login form.
+By entering an email address we are directed back to the consumer,
+completing the OpenID request:
>>> args = urlencode({
... 'openid.mode': 'checkid_setup',
@@ -71,7 +71,6 @@
>>> print user_browser.title
Login
>>> user_browser.getControl(name='field.email').value = 'mark@xxxxxxxxxxx'
- >>> user_browser.getControl(name='field.password').value = 'test'
>>> user_browser.getControl('Continue').click()
>>> print user_browser.url
@@ -128,7 +127,6 @@
... })
>>> user_browser.open('http://testopenid.dev/+openid?%s' % args)
>>> user_browser.getControl(name='field.email').value = 'mark@xxxxxxxxxxx'
- >>> user_browser.getControl(name='field.password').value = 'test'
>>> user_browser.getControl('Continue').click()
>>> print user_browser.contents
Request method: GET
=== modified file 'lib/lp/testopenid/stories/logging-in.txt'
--- lib/lp/testopenid/stories/logging-in.txt 2010-02-12 15:34:28 +0000
+++ lib/lp/testopenid/stories/logging-in.txt 2012-01-17 04:54:39 +0000
@@ -33,24 +33,21 @@
>>> print browser.title
Login
-As the user already has an account, they can enter their email address and
-password. If the password does not match the given email address, an error is
-shown:
+If the email address isn't registered, an error is shown:
- >>> browser.getControl(name='field.email').value = 'mark@xxxxxxxxxxx'
- >>> browser.getControl(name='field.password').value = 'not the password'
+ >>> browser.getControl(name='field.email').value = 'does@not.exist'
>>> browser.getControl('Continue').click()
>>> print browser.title
Login
>>> for tag in find_tags_by_class(browser.contents, 'error'):
... print extract_text(tag)
There is 1 error.
- Incorrect password for the provided email address.
-
-If the email address and password match, the user is logged in and returned to
-the relying party, with the user's identity URL:
-
- >>> browser.getControl(name='field.password').value = 'test'
+ Unknown email address.
+
+If the email address matches an account, the user is logged in and
+returned to the relying party, with the user's identity URL:
+
+ >>> browser.getControl(name='field.email').value = 'mark@xxxxxxxxxxx'
>>> browser.getControl('Continue').click()
>>> print browser.url
http://testopenid.dev/+echo?...