Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install googleappsauth

How to install googleappsauth

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install googleappsauth
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
1.03 Available View build log
Windows (64-bit)
1.03 Available View build log
Mac OS X (10.5+)
1.03 Available View build log
Linux (32-bit)
1.03 Available View build log
Linux (64-bit)
1.03 Available View build log
 
License
BSD
Dependencies
Imports
Lastest release
version 1.03 on Jan 5th, 2011

googleappsauth allows you to authenticate your Django users against an Google Apps domain. This means you basically get a single sign-on solution, provided that all users of your django application also have Accounts in Google Apps for your Domain.

Usage

To use googleappsauth, configuration in settings.py should look like this:

System Message: WARNING/2 (<string>, line 16)

Literal block expected; none found.

GOOGLE_APPS_DOMAIN = 'example.com' GOOGLE_APPS_CONSUMER_KEY = 'example.com' GOOGLE_APPS_CONSUMER_SECRET = 'sekret' # domain where your application is running GOOGLE_OPENID_REALM = 'http://*.hudora.biz/'

System Message: WARNING/2 (<string>, line 16); backlink

Inline emphasis start-string without end-string.

You also can tell googleappsauth where to go after successfull authentication, in case the redirect_url had not been set. LOGIN_REDIRECT_URL defaults to /.

System Message: WARNING/2 (<string>, line 26)

Literal block expected; none found.

LOGIN_REDIRECT_URL = '/admin'

To activate googleappsauth, set the appropriate Authentication backend and include a callback view.

System Message: WARNING/2 (<string>, line 31)

Literal block expected; none found.

settings.py: AUTHENTICATION_BACKENDS = ('googleappsauth.backends.GoogleAuthBackend',)

urls.py: (r'^callback_googleappsauth/', 'googleappsauth.views.callback'),

Using a special middleware which is included in the package, you can block access to a compete site.

System Message: WARNING/2 (<string>, line 41)

Literal block expected; none found.

MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'googleappsauth.middleware.GoogleAuthMiddleware', )

In addition you can set AUTH_PROTECTED_AREAS to authenticate only access to certain parts of a site, e.g.

System Message: WARNING/2 (<string>, line 51)

Literal block expected; none found.

AUTH_PROTECTED_AREAS = ['/admin']

Download

Get it at the Python Cheeseshop or at GitHub.

Subscribe to package updates

Last updated Jan 5th, 2011

Download Stats

Last month:7

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.