Skip to main content

Authentication backend that can use any field in the user table for identification.

Use any field in the user table for identification (as principal), such as ‘first name’, ‘id’ or ‘email’. It can be used in parallel or completely replace the standard django authentication backend (django.contrib.auth.backends.ModelBackend)

This version is supported on Python 3.6+; and Django 2.2+.

Installation

Install the package with pip:

$ pip install django-anyfield-auth-backend

To use the auth backend in a Django project, add 'django-anyfield-auth-backend' to AUTHENTICATION_BACKENDS. Do not add anything to INSTALLED_APPS.

AUTHENTICATION_BACKENDS += [
    'django-anyfield-auth-backend',
]

Configuration

Just configure the fields to be searched in the settings:

AUTH_ANYFIELDS (default [‘id’,’email’])
All fields that will be used to look for the user.
AUTH_ANYFIELDS_ONLY_UNIQUE_USERS (Default = True)
Allow only uniquely identified users.

Warning: false means that “all matched users” will be used to attempt authentication. This option is NOT recommended because of security and performance gaps.

Tests

To run the tests

python load_tests.py

Metadata

Release files for django-anyfield-auth-backend 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-anyfield-auth-backend 1.0.1
File Size Uploaded Provenance
django-anyfield-auth-backend-1.0.1.tar.gz 4.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for django-anyfield-auth-backend 1.0.1
File Interpreter ABI Platform
django_anyfield_auth_backend-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 8.4 kB

Release files / django-anyfield-auth-backend-1.0.1.tar.gz

Download URL django-anyfield-auth-backend-1.0.1.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
ad5b62e25d464eddc0fe6135dfe341aad583f212ee34bca48e26340091ff1eeb
BLAKE2b-256 checksum
How to use checksums
ec0ecef905ba1aea2d78354481cff52b17a00a472a4bf09ba361ed6250de4434
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.5

Release files / django_anyfield_auth_backend-1.0.1-py3-none-any.whl

Download URL django_anyfield_auth_backend-1.0.1-py3-none-any.whl
Size 4.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6aab743ac554047538a2563100ee411622a9ea09475925c7865e6be63b3844eb
BLAKE2b-256 checksum
How to use checksums
bf9fb2b497c5741acd5611325e40ef19852b8e1c049af57fca9f101e797be0b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.5

Security for django-anyfield-auth-backend 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page