Metadata-Version: 2.3
Name: django-freeipa-auth-email
Version: 0.1.0
Summary: A simple django freeipa authentication backend app with a simple server failover solution using email instead of username.
Author: Joe Siwiak
Author-email: joe@sunset-crew.com
Requires-Python: >=3.13
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.13
Requires-Dist: requests (>=2.34.2,<3.0.0)
Description-Content-Type: text/markdown

# Django FreeIPA Auth for Email

This is an authentication system that uses the email in freeipa for authentication.

## Setup 

```py
pip install django-freeipa-auth-email
``` 

## settings.py - CustomUser

add the customuser before you do the initial migrations

```py
AUTH_USER_MODEL = "freeipa_auth_email.CustomUser"
```

now run migrations

## settings.py - AuthSystem

add this so that it authenticates with freeipa

```py
INSTALLED_APPS = [
...
    "freeipa_auth_email",
...
]

AUTHENTICATION_BACKENDS = [
    # "django.contrib.auth.backends.ModelBackend", # disable in production unless during a maintenance window
    "freeipa_auth_email.backends.FreeIpaRpcAuthBackend",
]

FREEIPA_AUTH_BACKEND_ENABLED = True
FREEIPA_AUTH_SERVER = "ipa.example.com"  # defaults to None
# FREEIPA_AUTH_FAILOVER_SERVER = "ipa.failover.com" # defaults to None
FREEIPA_AUTH_SSL_VERIFY = False  # this would be the path to the ssl cert used
FREEIPA_AUTH_UPDATE_USER_GROUPS = True  # defaults to False
FREEIPA_AUTH_ALWAYS_UPDATE_USER = True
FREEIPA_AUTH_USER_ATTRS_MAP = {
    "first_name": "uid",
    "last_name": "sn",
    "email": "mail",
}
FREEIPA_AUTH_SERVER_TIMEOUT = 5
```

