1
Copyright 2010 Canonical Ltd. This software is licensed under the
2
GNU Affero General Public License version 3 (see the file LICENSE).
4
== Posts to the OpenID endpoint ==
6
The OpenID 2.0 protocol allows authentication requests to be made via
7
form posts. Such requests appear to be off-site form posts. We
8
explicitly allow POST requests through to the OpenID endpoint:
10
>>> from urllib import urlencode
11
>>> browser = setupBrowser("Basic no-priv@canonical.com:test")
12
>>> browser.mech_browser.set_handle_referer(False)
13
>>> browser.addHeader("Referer", 'http://relying-party.com/')
14
>>> browser.handleErrors = True
15
>>> browser.open('http://openid.launchpad.dev/+openid', data=urlencode({
16
... 'openid.mode': 'no-such-method'}))
18
http://openid.launchpad.dev/+openid
19
>>> print browser.contents
20
error:...'no-such-method'