Skip to main content

A simple Django app to enable custom behavior for remote user authentication

Project description

=====
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',
...
]


Project details


Release history Release notifications | RSS feed

This version

0.3

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-custom-remote-user-0.3.tar.gz (2.1 kB view hashes)

Uploaded Source

Built Distribution

django_custom_remote_user-0.3-py3-none-any.whl (2.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page