diff -Nru flask-openid-1.1.1+dfsg/Flask_OpenID.egg-info/PKG-INFO flask-openid-1.2.1+dfsg/Flask_OpenID.egg-info/PKG-INFO --- flask-openid-1.1.1+dfsg/Flask_OpenID.egg-info/PKG-INFO 2012-11-23 01:06:32.000000000 +0000 +++ flask-openid-1.2.1+dfsg/Flask_OpenID.egg-info/PKG-INFO 2014-01-26 12:56:23.000000000 +0000 @@ -1,10 +1,10 @@ Metadata-Version: 1.1 Name: Flask-OpenID -Version: 1.1.1 +Version: 1.2.1 Summary: OpenID support for Flask Home-page: http://github.com/mitsuhiko/flask-openid/ -Author: Armin Ronacher -Author-email: armin.ronacher@active-4.com +Author: Armin Ronacher, Patrick Uiterwijk +Author-email: armin.ronacher@active-4.com, puiterwijk@redhat.com License: BSD Description: Flask-OpenID diff -Nru flask-openid-1.1.1+dfsg/Flask_OpenID.egg-info/SOURCES.txt flask-openid-1.2.1+dfsg/Flask_OpenID.egg-info/SOURCES.txt --- flask-openid-1.1.1+dfsg/Flask_OpenID.egg-info/SOURCES.txt 2012-11-23 01:06:32.000000000 +0000 +++ flask-openid-1.2.1+dfsg/Flask_OpenID.egg-info/SOURCES.txt 2014-01-26 12:56:23.000000000 +0000 @@ -15,6 +15,19 @@ docs/index.rst docs/make.bat docs/_static/flask-openid.png +docs/_themes/.git +docs/_themes/.gitignore +docs/_themes/LICENSE +docs/_themes/README +docs/_themes/flask_theme_support.py +docs/_themes/flask/layout.html +docs/_themes/flask/relations.html +docs/_themes/flask/theme.conf +docs/_themes/flask/static/flasky.css_t +docs/_themes/flask/static/small_flask.css +docs/_themes/flask_small/layout.html +docs/_themes/flask_small/theme.conf +docs/_themes/flask_small/static/flasky.css_t example/README example/example.py example/static/openid.png diff -Nru flask-openid-1.1.1+dfsg/LICENSE flask-openid-1.2.1+dfsg/LICENSE --- flask-openid-1.1.1+dfsg/LICENSE 2012-11-23 01:01:00.000000000 +0000 +++ flask-openid-1.2.1+dfsg/LICENSE 2014-01-18 19:01:12.000000000 +0000 @@ -29,3 +29,10 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +--------------- + +OpenIDĀ® is a trademark (registered in numerous countries) of the OpenID Foundation. + +The OpenID logo in docs/_static/flask-openid.png is used under the +OpenID trademark and service mark license, as defined on http://openid.net/trademark-license/. diff -Nru flask-openid-1.1.1+dfsg/PKG-INFO flask-openid-1.2.1+dfsg/PKG-INFO --- flask-openid-1.1.1+dfsg/PKG-INFO 2012-11-23 01:06:32.000000000 +0000 +++ flask-openid-1.2.1+dfsg/PKG-INFO 2014-01-26 12:56:23.000000000 +0000 @@ -1,10 +1,10 @@ Metadata-Version: 1.1 Name: Flask-OpenID -Version: 1.1.1 +Version: 1.2.1 Summary: OpenID support for Flask Home-page: http://github.com/mitsuhiko/flask-openid/ -Author: Armin Ronacher -Author-email: armin.ronacher@active-4.com +Author: Armin Ronacher, Patrick Uiterwijk +Author-email: armin.ronacher@active-4.com, puiterwijk@redhat.com License: BSD Description: Flask-OpenID diff -Nru flask-openid-1.1.1+dfsg/debian/changelog flask-openid-1.2.1+dfsg/debian/changelog --- flask-openid-1.1.1+dfsg/debian/changelog 2013-05-04 21:06:30.000000000 +0000 +++ flask-openid-1.2.1+dfsg/debian/changelog 2014-01-29 18:09:41.000000000 +0000 @@ -1,3 +1,21 @@ +flask-openid (1.2.1+dfsg-1) unstable; urgency=low + + * New upstream release. + * Use pybuild buildsystem: + - debian/rules: Add --buildsystem=pybuild to dh call. + - debian/control: Add dh-python to Build-Depends. + * debian/control: Bump Standards-Version to 3.9.5, no changes required. + * debian/copyright: Update copyright years. + * debian/patches + - sphinx-default-theme.patch: Removed, no longer needed. + - github-fork.patch: Remove "Fork from github" button to fix + privacy-breach-generic from lintian. + * Use dh_python2 to remove SOURCES.txt: + - debian/python-flask-openid.pyremove: Add SOURCES.txt. + - debian/rules: Remove override_dh_auto_install. + + -- Sebastian Ramacher Wed, 29 Jan 2014 19:08:59 +0100 + flask-openid (1.1.1+dfsg-2) unstable; urgency=low * Upload to unstable. diff -Nru flask-openid-1.1.1+dfsg/debian/control flask-openid-1.2.1+dfsg/debian/control --- flask-openid-1.1.1+dfsg/debian/control 2013-03-23 22:32:51.000000000 +0000 +++ flask-openid-1.2.1+dfsg/debian/control 2014-01-29 18:09:41.000000000 +0000 @@ -5,14 +5,15 @@ Uploaders: Sebastian Ramacher Build-Depends: debhelper (>= 9), - python-all (>= 2.6.6-3~), + dh-python, + python-all, python-setuptools, python-sphinx (>= 1.0.7+dfsg), python-flask (>= 0.8), python-openid (>= 2.0), python-doc X-Python-Version: >= 2.6 -Standards-Version: 3.9.4 +Standards-Version: 3.9.5 Vcs-Svn: svn://anonscm.debian.org/python-modules/packages/flask-openid/trunk/ Vcs-Browser: http://anonscm.debian.org/viewvc/python-modules/packages/flask-openid/trunk/ Homepage: https://github.com/mitsuhiko/flask-openid diff -Nru flask-openid-1.1.1+dfsg/debian/copyright flask-openid-1.2.1+dfsg/debian/copyright --- flask-openid-1.1.1+dfsg/debian/copyright 2013-03-24 19:24:47.000000000 +0000 +++ flask-openid-1.2.1+dfsg/debian/copyright 2014-01-29 18:09:41.000000000 +0000 @@ -10,7 +10,7 @@ License: BSD-3-clause Files: debian/* -Copyright: 2013 Sebastian Ramacher +Copyright: 2013-2014 Sebastian Ramacher License: BSD-3-clause License: BSD-3-clause diff -Nru flask-openid-1.1.1+dfsg/debian/patches/github-fork.patch flask-openid-1.2.1+dfsg/debian/patches/github-fork.patch --- flask-openid-1.1.1+dfsg/debian/patches/github-fork.patch 1970-01-01 00:00:00.000000000 +0000 +++ flask-openid-1.2.1+dfsg/debian/patches/github-fork.patch 2014-01-29 18:09:41.000000000 +0000 @@ -0,0 +1,18 @@ +Description: Remove "Fork from GitHub" button which loads images from the web +Author: Sebastian Ramacher +Forwarded: not-needed +Last-Update: 2014-01-29 + +--- flask-openid-1.2.1+dfsg.orig/docs/_themes/flask_small/layout.html ++++ flask-openid-1.2.1+dfsg/docs/_themes/flask_small/layout.html +@@ -13,10 +13,6 @@ + {# do not display relbars #} + {% block relbar1 %}{% endblock %} + {% block relbar2 %} +- {% if theme_github_fork %} +- Fork me on GitHub +- {% endif %} + {% endblock %} + {% block sidebar1 %}{% endblock %} + {% block sidebar2 %}{% endblock %} diff -Nru flask-openid-1.1.1+dfsg/debian/patches/series flask-openid-1.2.1+dfsg/debian/patches/series --- flask-openid-1.1.1+dfsg/debian/patches/series 2013-03-23 22:32:51.000000000 +0000 +++ flask-openid-1.2.1+dfsg/debian/patches/series 2014-01-29 18:09:41.000000000 +0000 @@ -1,2 +1,2 @@ -sphinx-default-theme.patch intersphinx-mapping.patch +github-fork.patch diff -Nru flask-openid-1.1.1+dfsg/debian/patches/sphinx-default-theme.patch flask-openid-1.2.1+dfsg/debian/patches/sphinx-default-theme.patch --- flask-openid-1.1.1+dfsg/debian/patches/sphinx-default-theme.patch 2013-03-23 22:32:51.000000000 +0000 +++ flask-openid-1.2.1+dfsg/debian/patches/sphinx-default-theme.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,25 +0,0 @@ -Description: Use default theme for sphinx documentation - The tarball is missing the flask_small theme. Until this is fixed in the - tarball, build with the default theme. -Author: Sebastian Ramacher -Forwarded: not-needed -Last-Update: 2013-03-23 - ---- a/docs/conf.py -+++ b/docs/conf.py -@@ -89,14 +89,12 @@ - - # The theme to use for HTML and HTML Help pages. Major themes that come with - # Sphinx are currently 'default' and 'sphinxdoc'. --html_theme = 'flask_small' -+html_theme = 'default' - - # Theme options are theme-specific and customize the look and feel of a theme - # further. For a list of options available for each theme, see the - # documentation. - html_theme_options = { -- 'index_logo': 'flask-openid.png', -- 'github_fork': 'mitsuhiko/flask-openid' - } - - # Add any paths that contain custom themes here, relative to this directory. diff -Nru flask-openid-1.1.1+dfsg/debian/python-flask-openid.pyremove flask-openid-1.2.1+dfsg/debian/python-flask-openid.pyremove --- flask-openid-1.1.1+dfsg/debian/python-flask-openid.pyremove 1970-01-01 00:00:00.000000000 +0000 +++ flask-openid-1.2.1+dfsg/debian/python-flask-openid.pyremove 2014-01-29 18:09:41.000000000 +0000 @@ -0,0 +1 @@ +SOURCES.txt diff -Nru flask-openid-1.1.1+dfsg/debian/rules flask-openid-1.2.1+dfsg/debian/rules --- flask-openid-1.1.1+dfsg/debian/rules 2013-03-24 18:41:37.000000000 +0000 +++ flask-openid-1.2.1+dfsg/debian/rules 2014-01-29 18:09:41.000000000 +0000 @@ -1,7 +1,7 @@ #!/usr/bin/make -f %: - dh $@ --with=python2,sphinxdoc + dh $@ --with=python2,sphinxdoc --buildsystem=pybuild override_dh_clean: dh_clean @@ -11,10 +11,6 @@ dh_auto_build python setup.py build_sphinx -override_dh_auto_install: - dh_auto_install - rm debian/tmp/usr/lib/python*/*-packages/Flask_OpenID-*.egg-info/SOURCES.txt - DEB_DEBDIR=$(dir $(firstword $(MAKEFILE_LIST))) DEB_VER_DFSG=$(shell dpkg-parsechangelog -l$(DEB_DEBDIR)/changelog \ | sed -ne 's/^Version: \(.*\)-[^-]*/\1/p') diff -Nru flask-openid-1.1.1+dfsg/docs/_themes/.git flask-openid-1.2.1+dfsg/docs/_themes/.git --- flask-openid-1.1.1+dfsg/docs/_themes/.git 1970-01-01 00:00:00.000000000 +0000 +++ flask-openid-1.2.1+dfsg/docs/_themes/.git 2014-01-18 14:20:05.000000000 +0000 @@ -0,0 +1 @@ +gitdir: ../../.git/modules/docs/_themes diff -Nru flask-openid-1.1.1+dfsg/docs/_themes/.gitignore flask-openid-1.2.1+dfsg/docs/_themes/.gitignore --- flask-openid-1.1.1+dfsg/docs/_themes/.gitignore 1970-01-01 00:00:00.000000000 +0000 +++ flask-openid-1.2.1+dfsg/docs/_themes/.gitignore 2014-01-18 14:20:05.000000000 +0000 @@ -0,0 +1,3 @@ +*.pyc +*.pyo +.DS_Store diff -Nru flask-openid-1.1.1+dfsg/docs/_themes/LICENSE flask-openid-1.2.1+dfsg/docs/_themes/LICENSE --- flask-openid-1.1.1+dfsg/docs/_themes/LICENSE 1970-01-01 00:00:00.000000000 +0000 +++ flask-openid-1.2.1+dfsg/docs/_themes/LICENSE 2014-01-18 14:20:05.000000000 +0000 @@ -0,0 +1,37 @@ +Copyright (c) 2010 by Armin Ronacher. + +Some rights reserved. + +Redistribution and use in source and binary forms of the theme, with or +without modification, are permitted provided that the following conditions +are met: + +* Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + +* The names of the contributors may not be used to endorse or + promote products derived from this software without specific + prior written permission. + +We kindly ask you to only use these themes in an unmodified manner just +for Flask and Flask-related products, not for unrelated projects. If you +like the visual style and want to use it for your own projects, please +consider making some larger changes to the themes (such as changing +font faces, sizes, colors or margins). + +THIS THEME IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS THEME, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. diff -Nru flask-openid-1.1.1+dfsg/docs/_themes/README flask-openid-1.2.1+dfsg/docs/_themes/README --- flask-openid-1.1.1+dfsg/docs/_themes/README 1970-01-01 00:00:00.000000000 +0000 +++ flask-openid-1.2.1+dfsg/docs/_themes/README 2014-01-18 14:20:05.000000000 +0000 @@ -0,0 +1,31 @@ +Flask Sphinx Styles +=================== + +This repository contains sphinx styles for Flask and Flask related +projects. To use this style in your Sphinx documentation, follow +this guide: + +1. put this folder as _themes into your docs folder. Alternatively + you can also use git submodules to check out the contents there. +2. add this to your conf.py: + + sys.path.append(os.path.abspath('_themes')) + html_theme_path = ['_themes'] + html_theme = 'flask' + +The following themes exist: + +- 'flask' - the standard flask documentation theme for large + projects +- 'flask_small' - small one-page theme. Intended to be used by + very small addon libraries for flask. + +The following options exist for the flask_small theme: + + [options] + index_logo = '' filename of a picture in _static + to be used as replacement for the + h1 in the index.rst file. + index_logo_height = 120px height of the index logo + github_fork = '' repository name on github for the + "fork me" badge diff -Nru flask-openid-1.1.1+dfsg/docs/_themes/flask/layout.html flask-openid-1.2.1+dfsg/docs/_themes/flask/layout.html --- flask-openid-1.1.1+dfsg/docs/_themes/flask/layout.html 1970-01-01 00:00:00.000000000 +0000 +++ flask-openid-1.2.1+dfsg/docs/_themes/flask/layout.html 2014-01-18 14:20:05.000000000 +0000 @@ -0,0 +1,16 @@ +{%- extends "basic/layout.html" %} +{%- block extrahead %} + {{ super() }} + {% if theme_touch_icon %} + + {% endif %} + +{% endblock %} +{%- block relbar2 %}{% endblock %} +{%- block footer %} + +{%- endblock %} diff -Nru flask-openid-1.1.1+dfsg/docs/_themes/flask/relations.html flask-openid-1.2.1+dfsg/docs/_themes/flask/relations.html --- flask-openid-1.1.1+dfsg/docs/_themes/flask/relations.html 1970-01-01 00:00:00.000000000 +0000 +++ flask-openid-1.2.1+dfsg/docs/_themes/flask/relations.html 2014-01-18 14:20:05.000000000 +0000 @@ -0,0 +1,19 @@ +

Related Topics

+ diff -Nru flask-openid-1.1.1+dfsg/docs/_themes/flask/static/flasky.css_t flask-openid-1.2.1+dfsg/docs/_themes/flask/static/flasky.css_t --- flask-openid-1.1.1+dfsg/docs/_themes/flask/static/flasky.css_t 1970-01-01 00:00:00.000000000 +0000 +++ flask-openid-1.2.1+dfsg/docs/_themes/flask/static/flasky.css_t 2014-01-18 14:20:05.000000000 +0000 @@ -0,0 +1,387 @@ +/* + * flasky.css_t + * ~~~~~~~~~~~~ + * + * :copyright: Copyright 2010 by Armin Ronacher. + * :license: Flask Design License, see LICENSE for details. + */ + +{% set page_width = '940px' %} +{% set sidebar_width = '220px' %} + +@import url("basic.css"); + +/* -- page layout ----------------------------------------------------------- */ + +body { + font-family: 'Georgia', serif; + font-size: 17px; + background-color: white; + color: #000; + margin: 0; + padding: 0; +} + +div.document { + width: {{ page_width }}; + margin: 30px auto 0 auto; +} + +div.documentwrapper { + float: left; + width: 100%; +} + +div.bodywrapper { + margin: 0 0 0 {{ sidebar_width }}; +} + +div.sphinxsidebar { + width: {{ sidebar_width }}; +} + +hr { + border: 1px solid #B1B4B6; +} + +div.body { + background-color: #ffffff; + color: #3E4349; + padding: 0 30px 0 30px; +} + +img.floatingflask { + padding: 0 0 10px 10px; + float: right; +} + +div.footer { + width: {{ page_width }}; + margin: 20px auto 30px auto; + font-size: 14px; + color: #888; + text-align: right; +} + +div.footer a { + color: #888; +} + +div.related { + display: none; +} + +div.sphinxsidebar a { + color: #444; + text-decoration: none; + border-bottom: 1px dotted #999; +} + +div.sphinxsidebar a:hover { + border-bottom: 1px solid #999; +} + +div.sphinxsidebar { + font-size: 14px; + line-height: 1.5; +} + +div.sphinxsidebarwrapper { + padding: 18px 10px; +} + +div.sphinxsidebarwrapper p.logo { + padding: 0 0 20px 0; + margin: 0; + text-align: center; +} + +div.sphinxsidebar h3, +div.sphinxsidebar h4 { + font-family: 'Garamond', 'Georgia', serif; + color: #444; + font-size: 24px; + font-weight: normal; + margin: 0 0 5px 0; + padding: 0; +} + +div.sphinxsidebar h4 { + font-size: 20px; +} + +div.sphinxsidebar h3 a { + color: #444; +} + +div.sphinxsidebar p.logo a, +div.sphinxsidebar h3 a, +div.sphinxsidebar p.logo a:hover, +div.sphinxsidebar h3 a:hover { + border: none; +} + +div.sphinxsidebar p { + color: #555; + margin: 10px 0; +} + +div.sphinxsidebar ul { + margin: 10px 0; + padding: 0; + color: #000; +} + +div.sphinxsidebar input { + border: 1px solid #ccc; + font-family: 'Georgia', serif; + font-size: 1em; +} + +/* -- body styles ----------------------------------------------------------- */ + +a { + color: #004B6B; + text-decoration: underline; +} + +a:hover { + color: #6D4100; + text-decoration: underline; +} + +div.body h1, +div.body h2, +div.body h3, +div.body h4, +div.body h5, +div.body h6 { + font-family: 'Garamond', 'Georgia', serif; + font-weight: normal; + margin: 30px 0px 10px 0px; + padding: 0; +} + +div.body h1 { margin-top: 0; padding-top: 0; font-size: 240%; } +div.body h2 { font-size: 180%; } +div.body h3 { font-size: 150%; } +div.body h4 { font-size: 130%; } +div.body h5 { font-size: 100%; } +div.body h6 { font-size: 100%; } + +a.headerlink { + color: #ddd; + padding: 0 4px; + text-decoration: none; +} + +a.headerlink:hover { + color: #444; + background: #eaeaea; +} + +div.body p, div.body dd, div.body li { + line-height: 1.4em; +} + +div.admonition { + background: #fafafa; + margin: 20px -30px; + padding: 10px 30px; + border-top: 1px solid #ccc; + border-bottom: 1px solid #ccc; +} + +div.admonition tt.xref, div.admonition a tt { + border-bottom: 1px solid #fafafa; +} + +dd div.admonition { + margin-left: -60px; + padding-left: 60px; +} + +div.admonition p.admonition-title { + font-family: 'Garamond', 'Georgia', serif; + font-weight: normal; + font-size: 24px; + margin: 0 0 10px 0; + padding: 0; + line-height: 1; +} + +div.admonition p.last { + margin-bottom: 0; +} + +div.highlight { + background-color: white; +} + +dt:target, .highlight { + background: #FAF3E8; +} + +div.note { + background-color: #eee; + border: 1px solid #ccc; +} + +div.seealso { + background-color: #ffc; + border: 1px solid #ff6; +} + +div.topic { + background-color: #eee; +} + +p.admonition-title { + display: inline; +} + +p.admonition-title:after { + content: ":"; +} + +pre, tt { + font-family: 'Consolas', 'Menlo', 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace; + font-size: 0.9em; +} + +img.screenshot { +} + +tt.descname, tt.descclassname { + font-size: 0.95em; +} + +tt.descname { + padding-right: 0.08em; +} + +img.screenshot { + -moz-box-shadow: 2px 2px 4px #eee; + -webkit-box-shadow: 2px 2px 4px #eee; + box-shadow: 2px 2px 4px #eee; +} + +table.docutils { + border: 1px solid #888; + -moz-box-shadow: 2px 2px 4px #eee; + -webkit-box-shadow: 2px 2px 4px #eee; + box-shadow: 2px 2px 4px #eee; +} + +table.docutils td, table.docutils th { + border: 1px solid #888; + padding: 0.25em 0.7em; +} + +table.field-list, table.footnote { + border: none; + -moz-box-shadow: none; + -webkit-box-shadow: none; + box-shadow: none; +} + +table.footnote { + margin: 15px 0; + width: 100%; + border: 1px solid #eee; + background: #fdfdfd; + font-size: 0.9em; +} + +table.footnote + table.footnote { + margin-top: -15px; + border-top: none; +} + +table.field-list th { + padding: 0 0.8em 0 0; +} + +table.field-list td { + padding: 0; +} + +table.footnote td.label { + width: 0px; + padding: 0.3em 0 0.3em 0.5em; +} + +table.footnote td { + padding: 0.3em 0.5em; +} + +dl { + margin: 0; + padding: 0; +} + +dl dd { + margin-left: 30px; +} + +blockquote { + margin: 0 0 0 30px; + padding: 0; +} + +ul, ol { + margin: 10px 0 10px 30px; + padding: 0; +} + +pre { + background: #eee; + padding: 7px 30px; + margin: 15px -30px; + line-height: 1.3em; +} + +dl pre, blockquote pre, li pre { + margin-left: -60px; + padding-left: 60px; +} + +dl dl pre { + margin-left: -90px; + padding-left: 90px; +} + +tt { + background-color: #ecf0f3; + color: #222; + /* padding: 1px 2px; */ +} + +tt.xref, a tt { + background-color: #FBFBFB; + border-bottom: 1px solid white; +} + +a.reference { + text-decoration: none; + border-bottom: 1px dotted #004B6B; +} + +a.reference:hover { + border-bottom: 1px solid #6D4100; +} + +a.footnote-reference { + text-decoration: none; + font-size: 0.7em; + vertical-align: top; + border-bottom: 1px dotted #004B6B; +} + +a.footnote-reference:hover { + border-bottom: 1px solid #6D4100; +} + +a:hover tt { + background: #EEE; +} diff -Nru flask-openid-1.1.1+dfsg/docs/_themes/flask/static/small_flask.css flask-openid-1.2.1+dfsg/docs/_themes/flask/static/small_flask.css --- flask-openid-1.1.1+dfsg/docs/_themes/flask/static/small_flask.css 1970-01-01 00:00:00.000000000 +0000 +++ flask-openid-1.2.1+dfsg/docs/_themes/flask/static/small_flask.css 2014-01-18 14:20:05.000000000 +0000 @@ -0,0 +1,70 @@ +/* + * small_flask.css_t + * ~~~~~~~~~~~~~~~~~ + * + * :copyright: Copyright 2010 by Armin Ronacher. + * :license: Flask Design License, see LICENSE for details. + */ + +body { + margin: 0; + padding: 20px 30px; +} + +div.documentwrapper { + float: none; + background: white; +} + +div.sphinxsidebar { + display: block; + float: none; + width: 102.5%; + margin: 50px -30px -20px -30px; + padding: 10px 20px; + background: #333; + color: white; +} + +div.sphinxsidebar h3, div.sphinxsidebar h4, div.sphinxsidebar p, +div.sphinxsidebar h3 a { + color: white; +} + +div.sphinxsidebar a { + color: #aaa; +} + +div.sphinxsidebar p.logo { + display: none; +} + +div.document { + width: 100%; + margin: 0; +} + +div.related { + display: block; + margin: 0; + padding: 10px 0 20px 0; +} + +div.related ul, +div.related ul li { + margin: 0; + padding: 0; +} + +div.footer { + display: none; +} + +div.bodywrapper { + margin: 0; +} + +div.body { + min-height: 0; + padding: 0; +} diff -Nru flask-openid-1.1.1+dfsg/docs/_themes/flask/theme.conf flask-openid-1.2.1+dfsg/docs/_themes/flask/theme.conf --- flask-openid-1.1.1+dfsg/docs/_themes/flask/theme.conf 1970-01-01 00:00:00.000000000 +0000 +++ flask-openid-1.2.1+dfsg/docs/_themes/flask/theme.conf 2014-01-18 14:20:05.000000000 +0000 @@ -0,0 +1,7 @@ +[theme] +inherit = basic +stylesheet = flasky.css +pygments_style = flask_theme_support.FlaskyStyle + +[options] +touch_icon = diff -Nru flask-openid-1.1.1+dfsg/docs/_themes/flask_small/layout.html flask-openid-1.2.1+dfsg/docs/_themes/flask_small/layout.html --- flask-openid-1.1.1+dfsg/docs/_themes/flask_small/layout.html 1970-01-01 00:00:00.000000000 +0000 +++ flask-openid-1.2.1+dfsg/docs/_themes/flask_small/layout.html 2014-01-18 14:20:05.000000000 +0000 @@ -0,0 +1,22 @@ +{% extends "basic/layout.html" %} +{% block header %} + {{ super() }} + {% if pagename == 'index' %} +
+ {% endif %} +{% endblock %} +{% block footer %} + {% if pagename == 'index' %} +
+ {% endif %} +{% endblock %} +{# do not display relbars #} +{% block relbar1 %}{% endblock %} +{% block relbar2 %} + {% if theme_github_fork %} + Fork me on GitHub + {% endif %} +{% endblock %} +{% block sidebar1 %}{% endblock %} +{% block sidebar2 %}{% endblock %} diff -Nru flask-openid-1.1.1+dfsg/docs/_themes/flask_small/static/flasky.css_t flask-openid-1.2.1+dfsg/docs/_themes/flask_small/static/flasky.css_t --- flask-openid-1.1.1+dfsg/docs/_themes/flask_small/static/flasky.css_t 1970-01-01 00:00:00.000000000 +0000 +++ flask-openid-1.2.1+dfsg/docs/_themes/flask_small/static/flasky.css_t 2014-01-18 14:20:05.000000000 +0000 @@ -0,0 +1,287 @@ +/* + * flasky.css_t + * ~~~~~~~~~~~~ + * + * Sphinx stylesheet -- flasky theme based on nature theme. + * + * :copyright: Copyright 2007-2010 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ + +@import url("basic.css"); + +/* -- page layout ----------------------------------------------------------- */ + +body { + font-family: 'Georgia', serif; + font-size: 17px; + color: #000; + background: white; + margin: 0; + padding: 0; +} + +div.documentwrapper { + float: left; + width: 100%; +} + +div.bodywrapper { + margin: 40px auto 0 auto; + width: 700px; +} + +hr { + border: 1px solid #B1B4B6; +} + +div.body { + background-color: #ffffff; + color: #3E4349; + padding: 0 30px 30px 30px; +} + +img.floatingflask { + padding: 0 0 10px 10px; + float: right; +} + +div.footer { + text-align: right; + color: #888; + padding: 10px; + font-size: 14px; + width: 650px; + margin: 0 auto 40px auto; +} + +div.footer a { + color: #888; + text-decoration: underline; +} + +div.related { + line-height: 32px; + color: #888; +} + +div.related ul { + padding: 0 0 0 10px; +} + +div.related a { + color: #444; +} + +/* -- body styles ----------------------------------------------------------- */ + +a { + color: #004B6B; + text-decoration: underline; +} + +a:hover { + color: #6D4100; + text-decoration: underline; +} + +div.body { + padding-bottom: 40px; /* saved for footer */ +} + +div.body h1, +div.body h2, +div.body h3, +div.body h4, +div.body h5, +div.body h6 { + font-family: 'Garamond', 'Georgia', serif; + font-weight: normal; + margin: 30px 0px 10px 0px; + padding: 0; +} + +{% if theme_index_logo %} +div.indexwrapper h1 { + text-indent: -999999px; + background: url({{ theme_index_logo }}) no-repeat center center; + height: {{ theme_index_logo_height }}; +} +{% endif %} + +div.body h2 { font-size: 180%; } +div.body h3 { font-size: 150%; } +div.body h4 { font-size: 130%; } +div.body h5 { font-size: 100%; } +div.body h6 { font-size: 100%; } + +a.headerlink { + color: white; + padding: 0 4px; + text-decoration: none; +} + +a.headerlink:hover { + color: #444; + background: #eaeaea; +} + +div.body p, div.body dd, div.body li { + line-height: 1.4em; +} + +div.admonition { + background: #fafafa; + margin: 20px -30px; + padding: 10px 30px; + border-top: 1px solid #ccc; + border-bottom: 1px solid #ccc; +} + +div.admonition p.admonition-title { + font-family: 'Garamond', 'Georgia', serif; + font-weight: normal; + font-size: 24px; + margin: 0 0 10px 0; + padding: 0; + line-height: 1; +} + +div.admonition p.last { + margin-bottom: 0; +} + +div.highlight{ + background-color: white; +} + +dt:target, .highlight { + background: #FAF3E8; +} + +div.note { + background-color: #eee; + border: 1px solid #ccc; +} + +div.seealso { + background-color: #ffc; + border: 1px solid #ff6; +} + +div.topic { + background-color: #eee; +} + +div.warning { + background-color: #ffe4e4; + border: 1px solid #f66; +} + +p.admonition-title { + display: inline; +} + +p.admonition-title:after { + content: ":"; +} + +pre, tt { + font-family: 'Consolas', 'Menlo', 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace; + font-size: 0.85em; +} + +img.screenshot { +} + +tt.descname, tt.descclassname { + font-size: 0.95em; +} + +tt.descname { + padding-right: 0.08em; +} + +img.screenshot { + -moz-box-shadow: 2px 2px 4px #eee; + -webkit-box-shadow: 2px 2px 4px #eee; + box-shadow: 2px 2px 4px #eee; +} + +table.docutils { + border: 1px solid #888; + -moz-box-shadow: 2px 2px 4px #eee; + -webkit-box-shadow: 2px 2px 4px #eee; + box-shadow: 2px 2px 4px #eee; +} + +table.docutils td, table.docutils th { + border: 1px solid #888; + padding: 0.25em 0.7em; +} + +table.field-list, table.footnote { + border: none; + -moz-box-shadow: none; + -webkit-box-shadow: none; + box-shadow: none; +} + +table.footnote { + margin: 15px 0; + width: 100%; + border: 1px solid #eee; +} + +table.field-list th { + padding: 0 0.8em 0 0; +} + +table.field-list td { + padding: 0; +} + +table.footnote td { + padding: 0.5em; +} + +dl { + margin: 0; + padding: 0; +} + +dl dd { + margin-left: 30px; +} + +pre { + padding: 0; + margin: 15px -30px; + padding: 8px; + line-height: 1.3em; + padding: 7px 30px; + background: #eee; + border-radius: 2px; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; +} + +dl pre { + margin-left: -60px; + padding-left: 60px; +} + +tt { + background-color: #ecf0f3; + color: #222; + /* padding: 1px 2px; */ +} + +tt.xref, a tt { + background-color: #FBFBFB; +} + +a:hover tt { + background: #EEE; +} diff -Nru flask-openid-1.1.1+dfsg/docs/_themes/flask_small/theme.conf flask-openid-1.2.1+dfsg/docs/_themes/flask_small/theme.conf --- flask-openid-1.1.1+dfsg/docs/_themes/flask_small/theme.conf 1970-01-01 00:00:00.000000000 +0000 +++ flask-openid-1.2.1+dfsg/docs/_themes/flask_small/theme.conf 2014-01-18 14:20:05.000000000 +0000 @@ -0,0 +1,10 @@ +[theme] +inherit = basic +stylesheet = flasky.css +nosidebar = true +pygments_style = flask_theme_support.FlaskyStyle + +[options] +index_logo = '' +index_logo_height = 120px +github_fork = '' diff -Nru flask-openid-1.1.1+dfsg/docs/_themes/flask_theme_support.py flask-openid-1.2.1+dfsg/docs/_themes/flask_theme_support.py --- flask-openid-1.1.1+dfsg/docs/_themes/flask_theme_support.py 1970-01-01 00:00:00.000000000 +0000 +++ flask-openid-1.2.1+dfsg/docs/_themes/flask_theme_support.py 2014-01-18 14:20:05.000000000 +0000 @@ -0,0 +1,86 @@ +# flasky extensions. flasky pygments style based on tango style +from pygments.style import Style +from pygments.token import Keyword, Name, Comment, String, Error, \ + Number, Operator, Generic, Whitespace, Punctuation, Other, Literal + + +class FlaskyStyle(Style): + background_color = "#f8f8f8" + default_style = "" + + styles = { + # No corresponding class for the following: + #Text: "", # class: '' + Whitespace: "underline #f8f8f8", # class: 'w' + Error: "#a40000 border:#ef2929", # class: 'err' + Other: "#000000", # class 'x' + + Comment: "italic #8f5902", # class: 'c' + Comment.Preproc: "noitalic", # class: 'cp' + + Keyword: "bold #004461", # class: 'k' + Keyword.Constant: "bold #004461", # class: 'kc' + Keyword.Declaration: "bold #004461", # class: 'kd' + Keyword.Namespace: "bold #004461", # class: 'kn' + Keyword.Pseudo: "bold #004461", # class: 'kp' + Keyword.Reserved: "bold #004461", # class: 'kr' + Keyword.Type: "bold #004461", # class: 'kt' + + Operator: "#582800", # class: 'o' + Operator.Word: "bold #004461", # class: 'ow' - like keywords + + Punctuation: "bold #000000", # class: 'p' + + # because special names such as Name.Class, Name.Function, etc. + # are not recognized as such later in the parsing, we choose them + # to look the same as ordinary variables. + Name: "#000000", # class: 'n' + Name.Attribute: "#c4a000", # class: 'na' - to be revised + Name.Builtin: "#004461", # class: 'nb' + Name.Builtin.Pseudo: "#3465a4", # class: 'bp' + Name.Class: "#000000", # class: 'nc' - to be revised + Name.Constant: "#000000", # class: 'no' - to be revised + Name.Decorator: "#888", # class: 'nd' - to be revised + Name.Entity: "#ce5c00", # class: 'ni' + Name.Exception: "bold #cc0000", # class: 'ne' + Name.Function: "#000000", # class: 'nf' + Name.Property: "#000000", # class: 'py' + Name.Label: "#f57900", # class: 'nl' + Name.Namespace: "#000000", # class: 'nn' - to be revised + Name.Other: "#000000", # class: 'nx' + Name.Tag: "bold #004461", # class: 'nt' - like a keyword + Name.Variable: "#000000", # class: 'nv' - to be revised + Name.Variable.Class: "#000000", # class: 'vc' - to be revised + Name.Variable.Global: "#000000", # class: 'vg' - to be revised + Name.Variable.Instance: "#000000", # class: 'vi' - to be revised + + Number: "#990000", # class: 'm' + + Literal: "#000000", # class: 'l' + Literal.Date: "#000000", # class: 'ld' + + String: "#4e9a06", # class: 's' + String.Backtick: "#4e9a06", # class: 'sb' + String.Char: "#4e9a06", # class: 'sc' + String.Doc: "italic #8f5902", # class: 'sd' - like a comment + String.Double: "#4e9a06", # class: 's2' + String.Escape: "#4e9a06", # class: 'se' + String.Heredoc: "#4e9a06", # class: 'sh' + String.Interpol: "#4e9a06", # class: 'si' + String.Other: "#4e9a06", # class: 'sx' + String.Regex: "#4e9a06", # class: 'sr' + String.Single: "#4e9a06", # class: 's1' + String.Symbol: "#4e9a06", # class: 'ss' + + Generic: "#000000", # class: 'g' + Generic.Deleted: "#a40000", # class: 'gd' + Generic.Emph: "italic #000000", # class: 'ge' + Generic.Error: "#ef2929", # class: 'gr' + Generic.Heading: "bold #000080", # class: 'gh' + Generic.Inserted: "#00A000", # class: 'gi' + Generic.Output: "#888", # class: 'go' + Generic.Prompt: "#745334", # class: 'gp' + Generic.Strong: "bold #000000", # class: 'gs' + Generic.Subheading: "bold #800080", # class: 'gu' + Generic.Traceback: "bold #a40000", # class: 'gt' + } diff -Nru flask-openid-1.1.1+dfsg/docs/index.rst flask-openid-1.2.1+dfsg/docs/index.rst --- flask-openid-1.1.1+dfsg/docs/index.rst 2012-11-23 01:01:00.000000000 +0000 +++ flask-openid-1.2.1+dfsg/docs/index.rst 2014-01-18 18:16:41.000000000 +0000 @@ -34,8 +34,8 @@ To integrate Flask-OpenID into your application you need to create an instance of the :class:`OpenID` object first:: - from flask_openid import OpenID - oid = OpenID(app, '/path/to/store') + from flask.ext.openid import OpenID + oid = OpenID(app, '/path/to/store', safe_roots=[]) By default it will use the filesystem as store for information needed by OpenID for the authentication process. You can alternatively implement @@ -45,10 +45,16 @@ The path to the store can also be specified with the ``OPENID_FS_STORE_PATH`` configuration variable. -Alternatively the object can be instanciated without the application in +Alternatively the object can be instantiated without the application in which case it can later be registered for an application with the :meth:`~OpenID.init_app` method. +The list of URL roots that are safe to redirect the user to are passed via +`safe_roots`. Whenever the url root of the ``'next'`` request argument is not in +this list, the user will get redirected to the app root. All urls that are local +to the current app are always regared as trusted. This security mechanism +can be disabled by leaving `safe_roots` out, but this is not suggested. + The current logged in user has to memorized somewhere, we will use the ``'openid'`` key in the `session`. This can be implemented in a `before_request` function:: @@ -79,8 +85,8 @@ if request.method == 'POST': openid = request.form.get('openid') if openid: - return oid.try_login(openid, ask_for=['email', 'fullname', - 'nickname']) + return oid.try_login(openid, ask_for=['email', 'nickname'], + ask_for_optional=['fullname']) return render_template('login.html', next=oid.get_next_url(), error=oid.fetch_error()) @@ -89,8 +95,9 @@ just came from (:meth:`~OpenID.get_next_url` can do that for us). When the data is submitted we get the openid the user entered and try to login with that information. Additionally we ask the openid provider for email, -nickname and the user's full name. If that information is available, we -can use it to simplify the account creation process in our application. +nickname and the user's full name, where we declare full name as optional. +If that information is available, we can use it to simplify the account +creation process in our application. The template also needs the URL we want to return to, because it has to forward that information in the form. If an error happened, @@ -215,6 +222,15 @@ flash(u'You were signed out') return redirect(oid.get_next_url()) +Advanced usage +-------------- + +Flask-OpenID can also work with any python-openid extension. +To use this, pass a list of instantiated request openid.extension.Extension +objects in the `extensions` field of :meth:`~OpenID.try_login`. +The responses of these extensions are available during the :meth:`after_login` +function, as entries in resp.extensions. + Full Example ------------ @@ -224,6 +240,13 @@ Changes ------- +1.2 +``` + +- The safe_roots argument and URL security system was added. + +- The OpenID extensions system was added. + 1.0 ``` diff -Nru flask-openid-1.1.1+dfsg/example/example.py flask-openid-1.2.1+dfsg/example/example.py --- flask-openid-1.1.1+dfsg/example/example.py 2012-11-23 01:01:00.000000000 +0000 +++ flask-openid-1.2.1+dfsg/example/example.py 2014-01-18 15:41:19.000000000 +0000 @@ -12,7 +12,9 @@ """ from flask import Flask, render_template, request, g, session, flash, \ redirect, url_for, abort -from flask_openid import OpenID +from flask.ext.openid import OpenID + +from openid.extensions import pape from sqlalchemy import create_engine, Column, Integer, String from sqlalchemy.orm import scoped_session, sessionmaker @@ -27,7 +29,7 @@ ) # setup flask-openid -oid = OpenID(app) +oid = OpenID(app, safe_roots=[], extension_responses=[pape.Response]) # setup sqlalchemy engine = create_engine(app.config['DATABASE_URI']) @@ -84,8 +86,10 @@ if request.method == 'POST': openid = request.form.get('openid') if openid: - return oid.try_login(openid, ask_for=['email', 'fullname', - 'nickname']) + pape_req = pape.Request([]) + return oid.try_login(openid, ask_for=['email', 'nickname'], + ask_for_optional=['fullname'], + extensions=[pape_req]) return render_template('login.html', next=oid.get_next_url(), error=oid.fetch_error()) @@ -98,6 +102,9 @@ with a terrible URL which we certainly don't want. """ session['openid'] = resp.identity_url + if 'pape' in resp.extensions: + pape_resp = resp.extensions['pape'] + session['auth_time'] = pape_resp.auth_time user = User.query.filter_by(openid=resp.identity_url).first() if user is not None: flash(u'Successfully signed in') diff -Nru flask-openid-1.1.1+dfsg/flask_openid.py flask-openid-1.2.1+dfsg/flask_openid.py --- flask-openid-1.1.1+dfsg/flask_openid.py 2012-11-23 01:05:28.000000000 +0000 +++ flask-openid-1.2.1+dfsg/flask_openid.py 2014-01-26 12:52:16.000000000 +0000 @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- +# -* coding: utf-8 -*- """ flaskext.openid ~~~~~~~~~~~~~~~ @@ -141,11 +141,18 @@ class RegLookup(object): - def __init__(self, resp): + def __init__(self, resp, extensions): sreg_resp = SRegResponse.fromSuccessResponse(resp) self.sreg = sreg_resp and sreg_resp.data or {} self.ax_resp = ax.FetchResponse.fromSuccessResponse(resp) or {} + # Process the OpenID response with the OpenIDResponse class provided + self.ext = {} + for extension in extensions: + ext_name = getattr(extension, 'ns_alias', extension.__name__) + self.ext[ext_name] = \ + extension.fromSuccessResponse(resp) + def get(self, name, default=None): assert name in ALL_KEYS, 'unknown key %r' % name rv = self.sreg.get(name) @@ -180,10 +187,10 @@ the :meth:`~OpenID.try_login` function. """ - def __init__(self, resp): + def __init__(self, resp, extensions): #: the openid the user used for sign in self.identity_url = resp.identity_url - lookup = RegLookup(resp) + lookup = RegLookup(resp, extensions) #: the full name of the user self.fullname = lookup.get_combined('fullname', FULL_NAME_URIS) @@ -278,6 +285,10 @@ #: URL to profile image as string self.image = lookup.get('image') + #: Hash of the response object from the OpenID Extension by the + # OpenID Extension class name + self.extensions = lookup.ext + class OpenID(object): """Simple helper class for OpenID auth. Has to be created in advance @@ -312,10 +323,11 @@ if the HTTP referrer is unreliable. By default the user is redirected back to the application's index in that case. + :param extension_responses: a list of OpenID Extensions Response class. """ def __init__(self, app=None, fs_store_path=None, store_factory=None, - fallback_endpoint=None): + fallback_endpoint=None, extension_responses=None, safe_roots=None): # backwards compatibility support if isinstance(app, basestring): from warnings import warn @@ -338,6 +350,13 @@ self.store_factory = store_factory self.after_login_func = None self.fallback_endpoint = fallback_endpoint + if not extension_responses: + extension_responses = [] + self.extension_responses = extension_responses + if isinstance(safe_roots, basestring): + self.safe_roots = [safe_roots] + else: + self.safe_roots = safe_roots def init_app(self, app): """This callback can be used to initialize an application for the @@ -382,12 +401,25 @@ always return a valid URL. """ return ( - request.values.get('next') or - request.referrer or - (self.fallback_endpoint and url_for(self.fallback_endpoint)) or + self.check_safe_root(request.values.get('next')) or + self.check_safe_root(request.referrer) or + (self.fallback_endpoint and self.check_safe_root(url_for(self.fallback_endpoint))) or request.url_root ) + def check_safe_root(self, url): + if url is None: + return None + if self.safe_roots is None: + return url + if url.startswith(request.url_root) or url.startswith('/'): + # A URL inside the same app is deemed to always be safe + return url + for safe_root in self.safe_roots: + if url.startswith(safe_root): + return url + return None + def get_current_url(self): """the current URL + next.""" return request.base_url + '?next=' + url_quote(self.get_next_url()) @@ -399,16 +431,18 @@ """ return self.get_current_url() + '&openid_complete=yes' - def attach_reg_info(self, auth_request, keys): + def attach_reg_info(self, auth_request, keys, optional_keys): """Attaches sreg and ax requests to the auth request. :internal: """ - keys = set(keys) + keys = set(keys or []) + optional_keys = set(optional_keys or []) sreg_keys = list(SREG_KEYS & keys) - auth_request.addExtension(SRegRequest(required=sreg_keys)) + sreg_optional_keys = list(SREG_KEYS & optional_keys) + auth_request.addExtension(SRegRequest(required=sreg_keys, optional=sreg_optional_keys)) ax_req = ax.FetchRequest() - for key in keys: + for key in (keys | optional_keys): for uri in AX_MAPPING.get(key, ()): ax_req.add(ax.AttrInfo(uri, required=key in REQUIRED_KEYS)) auth_request.addExtension(ax_req) @@ -445,10 +479,12 @@ if request.args.get('openid_complete') != u'yes': return f(*args, **kwargs) consumer = Consumer(SessionWrapper(self), self.store_factory()) - openid_response = consumer.complete(request.args.to_dict(), - self.get_current_url()) + args = request.args.to_dict() + args.update(request.form.to_dict()) + openid_response = consumer.complete(args, self.get_current_url()) if openid_response.status == SUCCESS: - return self.after_login_func(OpenIDResponse(openid_response)) + return self.after_login_func(OpenIDResponse( + openid_response, self.extension_responses)) elif openid_response.status == CANCEL: self.signal_error(u'The request was cancelled') return redirect(self.get_current_url()) @@ -456,26 +492,41 @@ return redirect(self.get_current_url()) return decorated - def try_login(self, identity_url, ask_for=None): + def try_login(self, identity_url, ask_for=None, ask_for_optional=None, extensions=None): """This tries to login with the given identity URL. This function - must be called from the login_handler. The `ask_for` parameter can - be a set of values to be asked from the openid provider. + must be called from the login_handler. The `ask_for` and + `ask_for_optional`parameter can be a set of values to be asked + from the openid provider, where keys in `ask_for` are marked as + required, and keys in `ask_for_optional` are marked as optional. - The following strings can be used in the `ask_for` parameter: + The following strings can be used in the `ask_for` and + `ask_for_optional` parameters: ``aim``, ``blog``, ``country``, ``dob`` (date of birth), ``email``, ``fullname``, ``gender``, ``icq``, ``image``, ``jabber``, ``language``, ``msn``, ``nickname``, ``phone``, ``postcode``, ``skype``, ``timezone``, ``website``, ``yahoo`` + + `extensions` can be a list of instances of OpenID extension requests + that should be passed on with the request. If you use this, please make + sure to pass the Response classes of these extensions when initializing + OpenID. """ if ask_for and __debug__: for key in ask_for: if key not in ALL_KEYS: raise ValueError('invalid key %r' % key) + if ask_for_optional: + for key in ask_for_optional: + if key not in ALL_KEYS: + raise ValueError('invalid optional key %r' % key) try: consumer = Consumer(SessionWrapper(self), self.store_factory()) auth_request = consumer.begin(identity_url) - if ask_for: - self.attach_reg_info(auth_request, ask_for) + if ask_for or ask_for_optional: + self.attach_reg_info(auth_request, ask_for, ask_for_optional) + if extensions: + for extension in extensions: + auth_request.addExtension(extension) except discover.DiscoveryFailure: self.signal_error(u'The OpenID was invalid') return redirect(self.get_current_url()) diff -Nru flask-openid-1.1.1+dfsg/setup.py flask-openid-1.2.1+dfsg/setup.py --- flask-openid-1.1.1+dfsg/setup.py 2012-11-23 01:06:16.000000000 +0000 +++ flask-openid-1.2.1+dfsg/setup.py 2014-01-26 12:54:39.000000000 +0000 @@ -12,24 +12,40 @@ `_ """ from setuptools import setup +import sys +import os +# This check is to make sure we checkout docs/_themes before running sdist +if not os.path.exists("./docs/_themes/README"): + print('Please make sure you have docs/_themes checked out while running setup.py!') + if os.path.exists('.git'): + print('You seem to be using a git checkout, please execute the following commands to get the docs/_themes directory:') + print(' - git submodule init') + print(' - git submodule update') + else: + print('You seem to be using a release. Please use the release tarball from PyPI instead of the archive from GitHub') + sys.exit(1) + +extra = {} +if sys.version_info >= (3,): + install_requires = ['Flask>=0.10.1', 'python3-openid>=2.0'] + extra['use_2to3'] = True +else: + install_requires = ['Flask>=0.3', 'python-openid>=2.0'] setup( name='Flask-OpenID', - version='1.1.1', + version='1.2.1', url='http://github.com/mitsuhiko/flask-openid/', license='BSD', - author='Armin Ronacher', - author_email='armin.ronacher@active-4.com', + author='Armin Ronacher, Patrick Uiterwijk', + author_email='armin.ronacher@active-4.com, puiterwijk@redhat.com', description='OpenID support for Flask', long_description=__doc__, py_modules=['flask_openid'], zip_safe=False, platforms='any', - install_requires=[ - 'Flask>=0.3', - 'python-openid>=2.0' - ], + install_requires=install_requires, classifiers=[ 'Development Status :: 4 - Beta', 'Environment :: Web Environment', @@ -39,5 +55,6 @@ 'Programming Language :: Python', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', 'Topic :: Software Development :: Libraries :: Python Modules' - ] + ], + **extra )