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-shibboleth-remoteuser
============================

This is a fork used to keep things up to date

Middleware for using Shibboleth with Django. Requires Django 1.3 or above for RemoteAuthMiddleware.

[![Build Status](https://secure.travis-ci.org/Brown-University-Library/django-shibboleth-remoteuser.png?branch=master)](http://travis-ci.org/Brown-University-Library/django-shibboleth-remoteuser)

Installation and configuration
------
* Either checkout and run ```python setup.py install``` or install directly from Github with pip:

```
pip install git+https://github.com/Brown-University-Library/django-shibboleth-remoteuser.git
```

* In settings.py :

* Enable the RemoteUserBackend.

```python
AUTHENTICATION_BACKENDS += (
'shibboleth.backends.ShibbolethRemoteUserBackend',
)
```

* Add the Django Shibboleth middleware.
You must add the django.contrib.auth.middleware.ShibbolethRemoteUserMiddleware to the MIDDLEWARE_CLASSES setting after the django.contrib.auth.middleware.AuthenticationMiddleware.
For example:

```python
MIDDLEWARE_CLASSES = (
...
'django.contrib.auth.middleware.AuthenticationMiddleware',
'shibboleth.middleware.ShibbolethRemoteUserMiddleware',
...
)
```


* Map Shibboleth attributes to Django User models. The attributes must be stated in the form they have in the HTTP headers.
Use this to populate the Django User object from Shibboleth attributes.

The first element of the tuple states if the attribute is required or not. If a reqired element is not found in the parsed
Shibboleth headers, an exception will be raised.
(True, "required_attribute")
(False, "optional_attribute).

```python
SHIBBOLETH_ATTRIBUTE_MAP = {
"shib-user": (True, "username"),
"shib-given-name": (True, "first_name"),
"shib-sn": (True, "last_name"),
"shib-mail": (False, "email"),
}
```



* Login url - set this to the login handler of your shibboleth installation. In most cases, this will be something like:

```python
LOGIN_URL = 'https://your_domain.edu/Shibboleth.sso/Login'
```

* Apache configuration - make sure the shibboleth attributes are available to the app. The app url doesn't need to require Shibboleth.

```
<location app="">
AuthType shibboleth
Require shibboleth
</location>
```

Verify configuration
--------
If you would like to verify that everything is configured correctly, follow the next two steps below. It will create a route in your application at /yourapp/shib/ that echos the attributes obtained from Shibboleth. If you see the attributes you mapped above on the screen, all is good.
* Add shibboleth to installed apps.

```python
INSTALLED_APPS += (
'shibboleth',
)
```

* Add below to urls.py to enable the included sample view. This view just echos back the parsed user attributes, which can be helpful for testing.

```python
urlpatterns += patterns('',
url(r'^shib/', include('shibboleth.urls', namespace='shibboleth')),
)
```

At this point, the django-shibboleth-remoteuser middleware should be complete.

##Optional
###Template tags
* Template tags are included which will allow you to place {{ login_link }} or {{ logout_link }} in your templates for routing users to the login or logout page. These are available as a convenience and not required. To activate add the following to settings.py.

```python
TEMPLATE_CONTEXT_PROCESSORS += (
'shibboleth.context_processors.login_link',
'shibboleth.context_processors.logout_link'
)
```
Release History

Release History

0.6.2

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.6.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.6

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.5

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-shibboleth-remoteuser-kennydude-0.6.2.tar.gz (7.7 kB) Copy SHA256 Checksum SHA256 Source Aug 2, 2015

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