Skip to main content

OpenWebAuth authentication

Project description

Django authentication using OpenWebAuth

This is a django authentication backend based on OpenWebAuth (https://codeberg.org/fediverse/fep/src/branch/main/fep/61cf/fep-61cf.md). It enables decentralised single sign-on by authenticating a remote user against a remote server.

Repository: https://codeberg.org/abanink/django_auth_openwebauth

OpenWebAuth requires that you can add the /owa endpoint on the webservice root

Installation

$ pip install django-auth-openwebauth

Configuration

In settings.py

  • add this app to INSTALLED_APPS
    INSTALLED_APPS = [
        ...
        "django_auth_openwebauth",
        ...
    ]
    
  • add Middlewares
    MIDDLEWARE = [
        ...
        "django_auth_openwebauth.middleware.AttemptOpenWebAuthentication",
        "django_auth_openwebauth.middleware.ValidateOpenWebAuthentication",
        ...
        "django.contrib.auth.middleware.PersistentRemoteUserMiddleware",
        ...
    ]   
    
  • add Authentication Backend
    AUTHENTICATION_BACKENDS: tuple[str, ...] = (
        ...
        "django.contrib.auth.backends.RemoteUserBackend",
        ...
    )
    
    

In urls.py

  • add this package's urls
    if "django_auth_openwebauth" in settings.INSTALLED_APPS:
        urlpatterns.append(
            path("", include("django_auth_openwebauth.urls")),
        )
    

Usage

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

django_auth_openwebauth-0.0.1.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_auth_openwebauth-0.0.1-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

File details

Details for the file django_auth_openwebauth-0.0.1.tar.gz.

File metadata

  • Download URL: django_auth_openwebauth-0.0.1.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for django_auth_openwebauth-0.0.1.tar.gz
Algorithm Hash digest
SHA256 f98e2f0cb78bf88841b5a987d3407f73f9eb8bbd68d1152ae3ec3a565025ef47
MD5 866a8062c4d04071fa6620e51a9bf05f
BLAKE2b-256 1c3d07216e13b7a47e816dbbf371554e4ea3be2e90b002f5efc322845a78a846

See more details on using hashes here.

File details

Details for the file django_auth_openwebauth-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for django_auth_openwebauth-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c9a72df07249d6ac74d7155da1de0bb0f25348cc17b5d4b0ab1fff4a1068d0e2
MD5 5990d230cec2ba03af11b5bf4b9a3edf
BLAKE2b-256 477c06f39ae9e22f52e6040446a29d6d3dc1021cfa0427f4537e255d9039f510

See more details on using hashes here.

Supported by

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