This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

django-sessionprofile is the bridge between any software with customizable auth backends and Django. If you want to use Django for Single-Sign-On, this package does the Django heavy lifting.

Installation - Django

$ pip install django-sessionprofile

Add sessionprofile to INSTALLED_APPS, and run python manage.py migrate.

Add the sessionprofile middleware (sessionprofile.middleware.SessionProfileMiddleware) to your middleware settings - make sure it comes before the SessionMiddleware.

Additionally, the session cookie must be available for the third party application, this should not be a problem if it lives on the same domain.

Backend

Currently one backend is available: ‘sessionprofile.backends.DatabaseBackend’. In the future, alternative backends will be possible, like ‘sessionprofile.backends.CachedDatabaseBackend’.

Installation - third party application

This depends on which backend you decided to use, the example assumes the db backend.

When authenticating in the third party application, you should read the session cookie (SESSION_COOKIE_NAME), and query the sessionprofile table:

SELECT users_user.username, users_user.email FROM users_user, sessionprofile_sessionprofile sp WHERE sp.session_id = ‘<sessionid_from_cookie>’ AND users_user.id = sp.user_id

It’s up to you to implement the rest of the authentication flow. An example for phpBB 3.0.x is provided in the docs.

Thanks

Many thanks go to Resolver Systems Ltd (now part of PythonAnywhere) who made the initial version of this library, specifically aimed on phpBB3.

Todo

Django 1.9 will ship with customizable DB Session Backends, we might provide such a backend which would reduce the need for the middleware.

See Github PR.

Release History

Release History

1.0

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django_sessionprofile-1.0-py2.py3-none-any.whl (11.2 kB) Copy SHA256 Checksum SHA256 2.7 Wheel Aug 13, 2016
django-sessionprofile-1.0.tar.gz (5.6 kB) Copy SHA256 Checksum SHA256 Source Aug 13, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting