Metadata-Version: 2.4
Name: django-helseid
Version: 1.0.0
Summary: A Django app for HelseID authentication.
License: MIT
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: Django :: 6.0
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Security
Requires-Python: >=3.14
Requires-Dist: django>=6.0
Requires-Dist: requests-oauth2client>=1.8.0
Requires-Dist: requests>=2.32.5
Description-Content-Type: text/markdown

# django-helseid

Django application for authenticating users with HelseID

## Installation

1. Install the package:
   ```bash
   pip install django-helseid
   ```
   Or locally for development:
   ```bash
   uv pip install -e .
   ```

2. Add `helseid` to your `INSTALLED_APPS` in `settings.py`:
   ```python
   INSTALLED_APPS = [
       ...
       'helseid',
   ]
   ```

3. Add the authentication backend:
   ```python
   AUTHENTICATION_BACKENDS = [
       'django.contrib.auth.backends.ModelBackend',
       'helseid.backends.HelseIDBackend',
   ]
   ```

4. Configure `HELSEID` settings:
   ```python
   HELSEID = {
       'CLIENT_ID': 'your-client-id',
       'CLIENT_SECRET': { ... }, # JWK dict
       'SCOPE': ['openid', 'profile', ...],
       'SERVER_METADATA_URL': "https://helseid-sts.test.nhn.no/.well-known/openid-configuration",
   }
   ```
