pax_global_header 0000666 0000000 0000000 00000000064 11406724004 0014510 g ustar 00root root 0000000 0000000 52 comment=b666238f61574d12f922c40bf7917ec916df7125
openid-python-openid-b666238/ 0000775 0000000 0000000 00000000000 11406724004 0016043 5 ustar 00root root 0000000 0000000 openid-python-openid-b666238/CHANGES-2.2.0 0000664 0000000 0000000 00000003525 11406724004 0017500 0 ustar 00root root 0000000 0000000
* API changes
* SQLStore implementations no longer create or use a 'settings'
table
* SRegResponse.fromSuccessResponse returns None when no signed
arguments were found
* Added functions to generate request/response HTML forms with
auto-submission javascript
* Consumer (relying party) API: AuthRequest.htmlMarkup
* Server API: server.OpenIDResponse.toHTML
* PAPE (Provider Authentication Policy Extension) module
* Updated extension for specification draft 2
* Request.fromSuccessResponse returns None if PAPE response
arguments were not signed
* New features
* Demo server now supports OP-driven identifier selection
* Demo consumer now has a "stateless" option
* Fetchers now only read/request first megabyte of response
* Bug fixes
* NOT NULL constraints were added to SQLStore tables where
appropriate
* message.fromPostArgs: use query.items() instead of iteritems(),
fixes #161 (Affects Django users)
* check_authentication requests: copy entire response, not just
signed fields. Fixes missing namespace in check_authentication
requests
* Consumer._verifyDiscoveryResults: fall back to OpenID 1.0 type if
1.1 endpoint cannot be found; fixes discovery verification bug for
certain OpenID 1 identifiers
* SQLStore._execSQL: convert unicode arguments to str to avoid
postgresql api bug with unicode objects (Thanks to Marek Kuziel.)
* MySQLStore: Use ENGINE instead of TYPE when creating tables
* server.OpenIDResponse.toFormMarkup: Use return_to from the
request, not the response fields (Not all responses (i.e. cancel,
setup_needed) include a return_to field.)
* server.AssociationRequest.answer: include session_type in
no-encryption assoc responses
* OpenIDServiceEndpoint.getDisplayIdentifier: Don't include the
fragment in display identifiers.
openid-python-openid-b666238/LICENSE 0000664 0000000 0000000 00000026136 11406724004 0017060 0 ustar 00root root 0000000 0000000
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
openid-python-openid-b666238/MANIFEST.in 0000664 0000000 0000000 00000000443 11406724004 0017602 0 ustar 00root root 0000000 0000000 include LICENSE NOTICE CHANGELOG MANIFEST.in NEWS background-associations.txt
graft admin
graft contrib
recursive-include examples README discover *.py *.html *.xml
recursive-include openid/test *.txt dhpriv n2b64 *.py
recursive-include openid/test/data *
recursive-include doc *.css *.html
openid-python-openid-b666238/NEWS 0000664 0000000 0000000 00000017615 11406724004 0016554 0 ustar 00root root 0000000 0000000 What's New in Python OpenID 2.1.0
=================================
This implementation of OpenID has been upgraded to support version 2.0
of the OpenID Authentication specification.
New in this version is:
* Verification of relying party return_to addresses, to screen out RPs
hiding behind open redirect relays. Server code can invoke this with
the returnToVerified method on CheckIDRequest.
* Helper module for the Provider Authentication Policy Extension (PAPE) in
openid.extensions.pape.
* Helper module for Attribute Exchange in openid.extensions.ax.
Bugfixes:
* Allow the use of lxml as an ElementTree implemenation.
* Provide compatability with a wider range of versions for SQL stores.
Upgrading from 2.0.1
--------------------
The third argument to Consumer.complete() is required.
The sreg module should be imported from openid.extensions.sreg instead of
openid.sreg.
The ax module should likewise be imported from openid.extensions.ax
instead of openid.ax
The openid.extensions.ax.FetchRequest.fromOpenIDRequest method now
takes a CheckIDRequest object instead of a Message object
The OpenID response (the result of Consumer.complete()) now has a
getDisplayIdentifier() method which should be called instead of
accessing response.identity_url. The value of getDisplayIdentifier()
will be the XRI i-name if XRI is used. The value of
response.identity_url SHOULD, however, be used as the application's
database key for storing account information.
What's New in Python OpenID 2.0
===============================
The big news here is compatibility with svn revision 313 of the OpenID 2.0
draft specification.
Highlights include:
* Simple Registration support in a new module openid.sreg. (Those
previously using SuccessResponse.extensionResponse are advised to
look here.)
* OpenID provider-driven identifier selection.
* "Negotiators" allow you to define which association types to use.
* Examples for Django.
Dependencies
------------
Python 2.5 is now supported. Support for Python 2.2 discontinued.
Seperate installation of yadis and urljr packages is no longer
required; they have been included in this package.
Upgrading from 1.1 or 1.2
-------------------------
One of the additions to the OpenID protocol was a specified nonce
format for one-way nonces. As a result, the nonce table in the store
has changed. You'll need to run contrib/upgrade-store-1.1-to-2.0 to
upgrade your store, or you'll encounter errors about the wrong number
of columns in the oid_nonces table.
If you've written your own custom store or code that interacts directly with it,
you'll need to review the change notes in openid.store.interface.
Consumers should now pass an additional parameter to Consumer.complete()
to defend against return_to tampering.
What's New in Python OpenID 1.1.2
=================================
i-name Support
--------------
This version of the library allows the use of XRI as OpenID identifiers,
allowing users to log in with their i-names. For full XRI compatibility,
relying parties integrating this library should take note of the user's
CanonicalID, as described in the "Identifying the End User" section of the
OpenID 2.0 specification.
Bug Fixes
---------
A variety of bug fixes were included in this release, mostly relating to
international issues such as dealing with other character sets, Unicode,
incorrectly flagging certain Norwegian trust roots as suspect, and operation
of the filesystem-backed store on exotic platforms.
Dependencies
------------
* urljr 1.0.1
* yadis 1.1.0
What's New in Python OpenID 1.1.0
=================================
Version 1.1 of the Python OpenID library implements recent changes to
the OpenID specification as well as making API changes that should
make integration with applications easier.
Yadis Support
-------------
One of the major changes to OpenID since the last release has been the
approval of Yadis discovery as the preferred way to specify the OpenID
metadata for an identity URL instead of using tags in
HTML. This library does Yadis discovery, and if that fails, it falls
back to old-style discovery.
Some advantages of Yadis support are:
* Support for fallback if your primary OpenID provider is not available
* Support for load-balancing between OpenID servers
* Easy interoperability for different identity services
For more information about Yadis, see http://yadis.org/
Extension Support
-----------------
OpenID also has formalized support for extensions. Extensions are a
mechanism for transferring information from the consumer to the server
and from the server to the consumer in the process of performing
OpenID authentication. Extensions are implemented as additional
namespaced query arguments that go along with standard OpenID requests
and responses. This library provides a simple API for adding extension
arguments to requests and extracting extension responses from replies.
Dependencies
------------
These dependencies should be available from wherever you acquired the
OpenID library.
* urljr - The fetcher abstraction from the previous OpenID library
has been extended and is also used for the Yadis library. Because
the Yadis library is useful without the OpenID library, the HTTP
fetching code has been rolled into its own package. Additionally,
the library now has the concept of a default fetcher to make APIs
simpler.
* yadis - The Yadis library provides a general discovery layer that
has been adopted by OpenID as well as other identity-related
protocols. Most OpenID identity URLs will work without the Yadis
library, but as time goes on, this library will be more and more
important.
Consumer API
------------
The consumer API has been changed for more natural use as well as to
support extension arguments.
* OpenIDConsumer(store, [fetcher], [immediate]) is now
Consumer(session, store)
- The session object is a dictionary-like object that should be
tied to the requesting HTTP agent, for example, using a session
ID cookie. It is used for Yadis fallback and holding the state
of the OpenID transaction between the redirect to the server
and the response. The values that are placed in the session are
namespaced, so there should not be a conflict with other uses
of the same session. The session namespace is an attribute of
the Consumer object.
- Because the consumer object now does session management, it is
necessary to construct a new consumer object for every
request. Creating consumer objects is light-weight.
* OpenIDConsumer.beginAuth(user_url) is now Consumer.begin(user_url)
and either returns an AuthRequest object or raises an
exception. There is no more tuple unpacking or status codes.
* OpenIDConsumer.constructRedirect(authreq, return_to, trust_root) is
now AuthRequest.redirectURL(trust_root, return_to, [immediate]).
* OpenIDConsumer.completeAuth(token, query) is now
Consumer.complete(query). It no longer returns a tuple. Instead it
returns an object that has a status code and additional information
about the response. See the API documentation for more information.
Server API
----------
The server API has been changed for greater extensibility. Instead
of taking an "is_authorized" callback, processing happens in several
stages, allowing you to insert extension data into the response
before it is signed and returned. See the documentation for the
openid.server.server module.
Fetcher API
-----------
* fetcher was openid.consumer.fetchers.OpenIDHTTPFetcher, is now
urljr.fetchers.HTTPFetcher. get() and post() have been replaced by
fetch(), see urljr.fetchers for details.
Upgrading from 1.0
------------------
The server changed the way it indexes associations in the store, so if
you're upgrading a server installation, we recommend you clear the old
records from your store when you do so. As a consequence, consumers
will re-establish associations with your server a little sooner than
they would have otherwise.
openid-python-openid-b666238/NOTICE 0000664 0000000 0000000 00000000251 11406724004 0016745 0 ustar 00root root 0000000 0000000 Python OpenID may be obtained from
http://github.com/openid/python-openid
and we'd like to hear about how you're using this software.
Write to us at openid@janrain.com.
openid-python-openid-b666238/README 0000664 0000000 0000000 00000003230 11406724004 0016721 0 ustar 00root root 0000000 0000000 This is the Python OpenID library.
REQUIREMENTS
============
- Python 2.3, 2.4, or 2.5.
- ElementTree. This is included in the Python 2.5 standard library,
but users of earlier versions of Python may need to install it
seperately.
- pycrypto, if on Python 2.3 and without /dev/urandom, or on Python
2.3 or 2.4 and you want SHA256.
INSTALLATION
============
To install the base library, just run the following command:
python setup.py install
To run setup.py you need the distutils module from the Python standard
library; some distributions package this seperately in a "python-dev"
package.
GETTING STARTED
===============
The examples directory includes an example server and consumer
implementation. See the README file in that directory for more
information on running the examples.
Library documentation is available in html form in the doc directory.
LOGGING
=======
This library offers a logging hook that will record unexpected
conditions that occur in library code. If a condition is recoverable,
the library will recover and issue a log message. If it is not
recoverable, the library will raise an exception. See the
documentation for the openid.oidutil module for more on the logging
hook.
DOCUMENTATION
=============
The documentation in this library is in Epydoc format, which is
detailed at:
http://epydoc.sourceforge.net/
CONTACT
=======
Send bug reports, suggestions, comments, and questions to
http://openid.net/developers/dev-mailing-lists/.
If you have a bugfix or feature you'd like to contribute, don't
hesitate to send it to us. For more detailed information on how to
contribute, see
http://openidenabled.com/contribute/
openid-python-openid-b666238/admin/ 0000775 0000000 0000000 00000000000 11406724004 0017133 5 ustar 00root root 0000000 0000000 openid-python-openid-b666238/admin/builddiscover.py 0000664 0000000 0000000 00000004237 11406724004 0022351 0 ustar 00root root 0000000 0000000 #!/usr/bin/env python
import os.path
import urlparse
from openid.test import discoverdata
manifest_header = """\
# This file contains test cases for doing YADIS identity URL and
# service discovery. For each case, there are three URLs. The first
# URL is the user input. The second is the identity URL and the third
# is the URL from which the XRDS document should be read.
#
# The file format is as follows:
# User URL Identity URL XRDS URL
#
# blank lines and lines starting with # should be ignored.
#
# To use this test:
#
# 1. Run your discovery routine on the User URL.
#
# 2. Compare the identity URL returned by the discovery routine to the
# identity URL on that line of the file. It must be an EXACT match.
#
# 3. Do a regular HTTP GET on the XRDS URL. Compare the content that
# was returned by your discovery routine with the content returned
# from that URL. It should also be an exact match.
"""
def buildDiscover(base_url, out_dir):
"""Convert all files in a directory to apache mod_asis files in
another directory."""
test_data = discoverdata.readTests(discoverdata.default_test_file)
def writeTestFile(test_name):
template = test_data[test_name]
data = discoverdata.fillTemplate(
test_name, template, base_url, discoverdata.example_xrds)
out_file_name = os.path.join(out_dir, test_name)
out_file = file(out_file_name, 'w')
out_file.write(data)
manifest = [manifest_header]
for success, input_name, id_name, result_name in discoverdata.testlist:
if not success:
continue
writeTestFile(input_name)
input_url = urlparse.urljoin(base_url, input_name)
id_url = urlparse.urljoin(base_url, id_name)
result_url = urlparse.urljoin(base_url, result_name)
manifest.append('\t'.join((input_url, id_url, result_url)))
manifest.append('\n')
manifest_file_name = os.path.join(out_dir, 'manifest.txt')
manifest_file = file(manifest_file_name, 'w')
for chunk in manifest:
manifest_file.write(chunk)
manifest_file.close()
if __name__ == '__main__':
import sys
buildDiscover(*sys.argv[1:])
openid-python-openid-b666238/admin/fixperms 0000664 0000000 0000000 00000000262 11406724004 0020713 0 ustar 00root root 0000000 0000000 #!/usr/bin/env bash
cat - <