forked from theinterned/batucada
-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add missing 3rd party dep to get local docker image running
- Loading branch information
Showing
41 changed files
with
3,385 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
[submodule "lernanta/static/sass/p2pu-css-framework"] | ||
path = lernanta/static/sass/p2pu-css-framework | ||
url = http://github.com/p2pu/p2pu-css-framework | ||
url = http://github.com/p2pu/p2pu-theme |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
./django | ||
./MANIFEST | ||
./build | ||
./dist | ||
./sqlite.db |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
Copyright (C) 2007 Simon Willison | ||
Copyright (C) 2008-2010 Canonical Ltd. | ||
|
||
Redistribution and use in source and binary forms, 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. | ||
|
||
THIS SOFTWARE 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 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
include Makefile | ||
include MANIFEST.in | ||
include LICENSE.txt | ||
include README.txt | ||
include TODO.txt | ||
|
||
recursive-include django_openid_auth/templates *.html | ||
recursive-include example_consumer *.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
check: | ||
PYTHONPATH=$(shell pwd) python example_consumer/manage.py test \ | ||
--verbosity=2 django_openid_auth | ||
|
||
run-example-consumer: | ||
PYTHONPATH=$(shell pwd) python example_consumer/manage.py syncdb | ||
PYTHONPATH=$(shell pwd) python example_consumer/manage.py runserver | ||
|
||
.PHONY: check run-example-consumer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
= Django OpenID Authentication Support = | ||
|
||
This package provides integration between Django's authentication | ||
system and OpenID authentication. It also includes support for using | ||
a fixed OpenID server endpoint, which can be useful when implementing | ||
single signon systems. | ||
|
||
|
||
== Basic Installation == | ||
|
||
1. Install the Jan Rain Python OpenID library. It can be found at: | ||
|
||
http://openidenabled.com/python-openid/ | ||
|
||
It can also be found in most Linux distributions packaged as | ||
"python-openid". You will need version 2.2.0 or later. | ||
|
||
2. Add 'django_openid_auth' to INSTALLED_APPS for your application. | ||
At a minimum, you'll need the following in there: | ||
|
||
INSTALLED_APPS = ( | ||
'django.contrib.auth', | ||
'django.contrib.contenttypes', | ||
'django.contrib.sessions', | ||
'django_openid_auth', | ||
) | ||
|
||
3. Add 'django_auth_openid.auth.OpenIDBackend' to | ||
AUTHENTICATION_BACKENDS. This should be in addition to the | ||
default ModelBackend: | ||
|
||
AUTHENTICATION_BACKENDS = ( | ||
'django_openid_auth.auth.OpenIDBackend', | ||
'django.contrib.auth.backends.ModelBackend', | ||
) | ||
|
||
4. To create users automatically when a new OpenID is used, add the | ||
following to the settings: | ||
|
||
OPENID_CREATE_USERS = True | ||
|
||
5. To have user details updated from OpenID Simple Registration or | ||
Attribute Exchange extension data each time they log in, add the | ||
following: | ||
|
||
OPENID_UPDATE_DETAILS_FROM_SREG = True | ||
|
||
6. Hook up the login URLs to your application's urlconf with | ||
something like: | ||
|
||
urlpatterns = patterns('', | ||
... | ||
(r'^openid/', include('django_openid_auth.urls')), | ||
... | ||
) | ||
|
||
7. Configure the LOGIN_URL and LOGIN_REDIRECT_URL appropriately for | ||
your site: | ||
|
||
LOGIN_URL = '/openid/login/' | ||
LOGIN_REDIRECT_URL = '/' | ||
|
||
This will allow pages that use the standard @login_required | ||
decorator to use the OpenID login page. | ||
|
||
8. Rerun "python manage.py syncdb" to add the UserOpenID table to | ||
your database. | ||
|
||
|
||
== Configuring Single Sign-On == | ||
|
||
If you only want to accept identities from a single OpenID server and | ||
that server implemnts OpenID 2.0 identifier select mode, add the | ||
following setting to your app: | ||
|
||
OPENID_SSO_SERVER_URL = 'server-endpoint-url' | ||
|
||
With this setting enabled, the user will not be prompted to enter | ||
their identity URL, and instead an OpenID authentication request will | ||
be started with the given server URL. | ||
|
||
As an example, to use Launchpad accounts for SSO, you'd use: | ||
|
||
OPENID_SSO_SERVER_URL = 'https://login.launchpad.net/' | ||
|
||
|
||
== Launchpad Teams Support == | ||
|
||
This library supports the Launchpad Teams OpenID extension. Using | ||
this feature, it is possible to map Launchpad team memberships to | ||
Django group memberships. It can be configured with: | ||
|
||
OPENID_SSO_SERVER_URL = 'https://login.launchpad.net/' | ||
OPENID_LAUNCHPAD_TEAMS_MAPPING = { | ||
'launchpad-team-1': 'django-group-1', | ||
'launchpad-team-2': 'django-group-2', | ||
} | ||
|
||
When a user logs in, they will be added or removed from the relevant | ||
teams listed in the mapping. | ||
|
||
If you have already django-groups and want to map these groups automatically, you can use the OPENID_LAUNCHPAD_TEAMS_MAPPING_AUTO variable in your settings.py file. | ||
|
||
OPENID_LAUNCHPAD_TEAMS_MAPPING_AUTO = True | ||
|
||
If you use OPENID_LAUNCHPAD_TEAMS_MAPPING_AUTO, the variable OPENID_LAUNCHPAD_TEAMS_MAPPING will be ignored. | ||
If you want to exclude some groups from the auto mapping, use OPENID_LAUNCHPAD_TEAMS_MAPPING_AUTO_BLACKLIST. This variable has only an effect if OPENID_LAUNCHPAD_TEAMS_MAPPING_AUTO is True. | ||
|
||
OPENID_LAUNCHPAD_TEAMS_MAPPING_AUTO_BLACKLIST = ['django-group1', 'django-group2'] | ||
|
||
== External redirect domains == | ||
|
||
By default, redirecting back to an external URL after auth is forbidden. To permit redirection to external URLs on a separate domain, define ALLOWED_EXTERNAL_OPENID_REDIRECT_DOMAINS in your settings.py file as a list of permitted domains: | ||
|
||
ALLOWED_EXTERNAL_OPENID_REDIRECT_DOMAINS = ['example.com', 'example.org'] | ||
|
||
and redirects to external URLs on those domains will additionally be permitted. | ||
|
||
== Use as /admin (django.admin.contrib) login == | ||
|
||
If you require openid authentication into the admin application, add the following setting: | ||
|
||
OPENID_USE_AS_ADMIN_LOGIN = True | ||
|
||
It is worth noting that a user needs to be be marked as a "staff user" to be able to access the admin interface. A new openid user will not normally be a "staff user". | ||
The easiest way to resolve this is to use traditional authentication (OPENID_USE_AS_ADMIN_LOGIN = False) to sign in as your first user with a password and authorise your | ||
openid user to be staff. |
Empty file.
31 changes: 31 additions & 0 deletions
31
3rdparty/django-openid-auth/django_openid_auth.egg-info/PKG-INFO
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
Metadata-Version: 1.1 | ||
Name: django-openid-auth | ||
Version: 0.3 | ||
Summary: OpenID integration for django.contrib.auth | ||
Home-page: https://launchpad.net/django-openid-auth | ||
Author: Canonical Ltd | ||
Author-email: UNKNOWN | ||
License: BSD | ||
Download-URL: http://launchpad.net/django-openid-auth/trunk/0.3/+download/django-openid-auth-0.3.tar.gz | ||
Description: A library that can be used to add OpenID support to Django applications. | ||
The library integrates with Django's built in authentication system, so | ||
most applications require minimal changes to support OpenID llogin. The | ||
library also includes the following features: | ||
* Basic user details are transferred from the OpenID server via the | ||
Simple Registration extension or Attribute Exchange extension. | ||
* can be configured to use a fixed OpenID server URL, for use in SSO. | ||
* supports the launchpad.net teams extension to get team membership | ||
info. | ||
|
||
Platform: any | ||
Classifier: Development Status :: 4 - Beta | ||
Classifier: Environment :: Web Environment | ||
Classifier: Framework :: Django | ||
Classifier: Intended Audience :: Developers | ||
Classifier: License :: OSI Approved :: BSD License | ||
Classifier: Operating System :: OS Independent | ||
Classifier: Programming Language :: Python | ||
Classifier: Topic :: Software Development :: Libraries :: Python Modules | ||
Requires: django (>=1.2) | ||
Requires: openid (>=2.2.0) | ||
Provides: django_openid_auth |
33 changes: 33 additions & 0 deletions
33
3rdparty/django-openid-auth/django_openid_auth.egg-info/SOURCES.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
LICENSE.txt | ||
MANIFEST.in | ||
Makefile | ||
README.txt | ||
TODO.txt | ||
django_openid_auth/__init__.py | ||
django_openid_auth/admin.py | ||
django_openid_auth/auth.py | ||
django_openid_auth/forms.py | ||
django_openid_auth/models.py | ||
django_openid_auth/store.py | ||
django_openid_auth/teams.py | ||
django_openid_auth/urls.py | ||
django_openid_auth/views.py | ||
django_openid_auth.egg-info/PKG-INFO | ||
django_openid_auth.egg-info/SOURCES.txt | ||
django_openid_auth.egg-info/dependency_links.txt | ||
django_openid_auth.egg-info/top_level.txt | ||
django_openid_auth/management/__init__.py | ||
django_openid_auth/management/commands/__init__.py | ||
django_openid_auth/management/commands/openid_cleanup.py | ||
django_openid_auth/templates/openid/failure.html | ||
django_openid_auth/templates/openid/login.html | ||
django_openid_auth/tests/__init__.py | ||
django_openid_auth/tests/test_auth.py | ||
django_openid_auth/tests/test_store.py | ||
django_openid_auth/tests/test_views.py | ||
django_openid_auth/tests/urls.py | ||
example_consumer/__init__.py | ||
example_consumer/manage.py | ||
example_consumer/settings.py | ||
example_consumer/urls.py | ||
example_consumer/views.py |
1 change: 1 addition & 0 deletions
1
3rdparty/django-openid-auth/django_openid_auth.egg-info/dependency_links.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
1 change: 1 addition & 0 deletions
1
3rdparty/django-openid-auth/django_openid_auth.egg-info/top_level.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
django_openid_auth |
29 changes: 29 additions & 0 deletions
29
3rdparty/django-openid-auth/django_openid_auth/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# django-openid-auth - OpenID integration for django.contrib.auth | ||
# | ||
# Copyright (C) 2007 Simon Willison | ||
# Copyright (C) 2008-2010 Canonical Ltd. | ||
# | ||
# Redistribution and use in source and binary forms, 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. | ||
# | ||
# THIS SOFTWARE 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 SOFTWARE, EVEN IF ADVISED OF THE | ||
# POSSIBILITY OF SUCH DAMAGE. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
# django-openid-auth - OpenID integration for django.contrib.auth | ||
# | ||
# Copyright (C) 2008-2010 Canonical Ltd. | ||
# Copyright (C) 2010 Dave Walker | ||
# | ||
# Redistribution and use in source and binary forms, 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. | ||
# | ||
# THIS SOFTWARE 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 SOFTWARE, EVEN IF ADVISED OF THE | ||
# POSSIBILITY OF SUCH DAMAGE. | ||
|
||
from django.conf import settings | ||
from django.contrib import admin | ||
from django_openid_auth.models import Nonce, Association, UserOpenID | ||
from django_openid_auth.store import DjangoOpenIDStore | ||
|
||
|
||
class NonceAdmin(admin.ModelAdmin): | ||
list_display = ('server_url', 'timestamp') | ||
actions = ['cleanup_nonces'] | ||
|
||
def cleanup_nonces(self, request, queryset): | ||
store = DjangoOpenIDStore() | ||
count = store.cleanupNonces() | ||
self.message_user(request, "%d expired nonces removed" % count) | ||
cleanup_nonces.short_description = "Clean up expired nonces" | ||
|
||
admin.site.register(Nonce, NonceAdmin) | ||
|
||
|
||
class AssociationAdmin(admin.ModelAdmin): | ||
list_display = ('server_url', 'assoc_type') | ||
list_filter = ('assoc_type',) | ||
search_fields = ('server_url',) | ||
actions = ['cleanup_associations'] | ||
|
||
def cleanup_associations(self, request, queryset): | ||
store = DjangoOpenIDStore() | ||
count = store.cleanupAssociations() | ||
self.message_user(request, "%d expired associations removed" % count) | ||
cleanup_associations.short_description = "Clean up expired associations" | ||
|
||
admin.site.register(Association, AssociationAdmin) | ||
|
||
|
||
class UserOpenIDAdmin(admin.ModelAdmin): | ||
list_display = ('user', 'claimed_id') | ||
search_fields = ('claimed_id',) | ||
|
||
admin.site.register(UserOpenID, UserOpenIDAdmin) | ||
|
||
|
||
# Support for allowing openid authentication for /admin (django.contrib.admin) | ||
if getattr(settings, 'OPENID_USE_AS_ADMIN_LOGIN', False): | ||
from django.http import HttpResponseRedirect | ||
from django_openid_auth import views | ||
|
||
def _openid_login(self, request, error_message='', extra_context=None): | ||
if request.user.is_authenticated(): | ||
if not request.user.is_staff: | ||
return views.render_failure( | ||
request, "User %s does not have admin access." | ||
% request.user.username) | ||
return views.render_failure( | ||
request, "Unknown Error: %s" % error_message) | ||
else: | ||
# Redirect to openid login path, | ||
return HttpResponseRedirect( | ||
settings.LOGIN_URL + "?next=" + request.get_full_path()) | ||
|
||
# Overide the standard admin login form. | ||
admin.sites.AdminSite.display_login_form = _openid_login |
Oops, something went wrong.