django-auth-abakus Build Coverage Latest Version Supported Python versions

A django auth module that can be used to to authenticate users against the API of abakus.no. If you would like to use it you need a API token.

Contact webkom@abakus.no to request one.

Usage

Set the authentication backend to *AbakusBackend:

AUTHENTICATION_BACKENDS = ( 'abakus.auth.AbakusBackend', )

The token should be added in the django-settings as ABAKUS_TOKEN:

ABAKUS_TOKEN = 'private_token'

Contribute

Open an issue or a pull-request with your fix or awesome new feature. Make sure to check those that are already open, to avoid duplicates.

Contents:

Settings

ABAKUS_AUTH_REQUIRE_ABAKUS

Default: False

Set ABAKUS_AUTH_REQUIRE_ABAKUS = True to require Abakus membership in order to authenticate.

ABAKUS_AUTH_REQUIRE_ABAKOM

Default: False

Set ABAKUS_AUTH_REQUIRE_ABAKOM = True to require committee membership in order to authenticate.

ABAKUS_GROUP_REQUIRED

Default: []

ABAKUS_GROUP_REQUIRED is a list of required groups.

Example: The user needs to be member of Webkom:

ABAKUS_GROUP_REQUIRED = ['Webkom']
ABAKUS_SUPERUSER_GROUPS

Default: []

ABAKUS_SUPERUSER_GROUPS is a list of committees with superuser access.

Example: The user needs to be member of Webkom or HS:

ABAKUS_SUPERUSER_GROUPS = ['Webkom', 'HS']