Metadata-Version: 2.1
Name: django-custom-remote-user
Version: 0.3
Summary: A simple Django app to enable custom behavior for remote user authentication
Home-page: https://github.com/HassanKadhem/django-custom-remote-user
Author: Hassan Kadhem
Author-email: hassan.kadhem@gmail.com
License: MIT License
Platform: UNKNOWN
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Framework :: Django :: 1.10
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.6
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content

=====
Custom Remote User
=====

Custom Remote User is a Django app that extends remote user authentication
enabling custom common behavior. The app currently offers only a case-insensitive
backend `CaseInsensitiveRemoteUserBackend`.

`CaseInsensitiveRemoteUserBackend` guarantees that all users created using an 
external authentication service are created with an all-lower case username.
This is important because some external authentication services return a 
case-sensitive username upon login. This is problematic with Django as the built-in
user model is case-sensitive. This means a single remote user may have two different
records in that database (e.g. 'Username' is different than 'username').


Quick start
-----------

1. Add "custom_remote_user" to your INSTALLED_APPS setting like this::

    INSTALLED_APPS = [
        ...
        'custom_remote_user',
    ]

2. Add CaseInsensitiveRemoteUserBackend::

    AUTHENTICATION_BACKENDS = [
        'custom_remote_user.backends.CaseInsensitiveRemoteUserBackend',
    ]

3. Add the required middlewares for remote user authentication::

    MIDDLEWARE = [
        ...
        'django.contrib.auth.middleware.AuthenticationMiddleware',
        'django.contrib.auth.middleware.RemoteUserMiddleware',
        ...
    ]


