Skip to main content

The Data Central authentication django app

Project description

dc-auth is a dedicated Django app to connect the Data Central authentication backend (LDAP) to multiple dc sites (api, cms etc) via CAS. It supports session-based authentication (tested) and JWT authentication (untested).

For users outside of Data Central, you’ll need to send us details about your application in order to be able to connect, please contact us at

Quick start

Add “dc_auth” + the following apps to your INSTALLED_APPS setting like this:


Add django_settings_export.settings_export to your project’s context_processors:

    'context_processors': [
        'django_settings_export.settings_export',                   # <----

Include the dc_auth URLconf in your project like this:

path('auth/', include('dc_auth.urls')),

Migrate to create the Profile table. Run python migrate.

Start the development server and visit to log into your account.


From the top-level directory run:

$ tox

dcauth comes with some helpers that tools building on dcauth can use, specifically pytest fixtures for affiliation (affiliation) and test passwords (secure_password), as well as factories and fixtures for the User and Profile classes.

Installing for internal applications

To install into another Data Central project, add dc_auth to your requirements file (lock to a specific version), and ensure that pip is pointed to the DC devpi instance.

Project details

Download files

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

Source Distribution

dc_auth-1.2.9.tar.gz (1.2 MB view hashes)

Uploaded source

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