Metadata-Version: 2.5
Name: freehand-kit-auth
Version: 1.0.0
Summary: Configurable Django REST Framework authentication endpoints built on Simple JWT.
Project-URL: Documentation, https://github.com/anser14/free-hand-kit-auth#readme
Project-URL: Issues, https://github.com/anser14/free-hand-kit-auth/issues
Project-URL: Source, https://github.com/anser14/free-hand-kit-auth
Project-URL: Changelog, https://github.com/anser14/free-hand-kit-auth/blob/main/CHANGELOG.md
Project-URL: Security, https://github.com/anser14/free-hand-kit-auth/security/policy
Author: Freehand Kit contributors
License-Expression: MIT
License-File: LICENSE
Keywords: authentication,django,django-rest-framework,drf,jwt,openapi
Classifier: Development Status :: 5 - Production/Stable
Classifier: Framework :: Django
Classifier: Framework :: Django :: 5.2
Classifier: Framework :: Django :: 6.0
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: django<6.1,>=5.2
Requires-Dist: djangorestframework-simplejwt<6,>=5.5.1
Requires-Dist: djangorestframework<3.18,>=3.17.2
Requires-Dist: drf-spectacular<1,>=0.29
Provides-Extra: crypto
Requires-Dist: djangorestframework-simplejwt[crypto]<6,>=5.5.1; extra == 'crypto'
Provides-Extra: dev
Requires-Dist: build>=1.2; extra == 'dev'
Requires-Dist: coverage[toml]>=7.6; extra == 'dev'
Requires-Dist: django-stubs[compatible-mypy]>=5.1; extra == 'dev'
Requires-Dist: djangorestframework-simplejwt[crypto]<6,>=5.5.1; extra == 'dev'
Requires-Dist: djangorestframework-stubs>=3.15; extra == 'dev'
Requires-Dist: fakeredis<3,>=2.26; extra == 'dev'
Requires-Dist: mypy>=1.13; extra == 'dev'
Requires-Dist: pip-audit>=2.8; extra == 'dev'
Requires-Dist: psycopg[binary]>=3.2; extra == 'dev'
Requires-Dist: pytest-django>=4.9; extra == 'dev'
Requires-Dist: pytest>=8.3; extra == 'dev'
Requires-Dist: redis<7,>=5; extra == 'dev'
Requires-Dist: ruff>=0.8; extra == 'dev'
Requires-Dist: twine>=6.0; extra == 'dev'
Provides-Extra: redis
Requires-Dist: redis<7,>=5; extra == 'redis'
Provides-Extra: rsa
Requires-Dist: djangorestframework-simplejwt[crypto]<6,>=5.5.1; extra == 'rsa'
Description-Content-Type: text/markdown

# Freehand Kit Auth

`freehand-kit-auth` provides configurable Django REST Framework authentication
workflows for Django applications. The import package and `INSTALLED_APPS` entry is
`fk_auth`.

> **Status: stable 1.x.** The supported baseline is Python 3.11+, Django 5.2–6.0,
> and Django REST Framework 3.17.2–3.17.x. Production deployment still requires the
> host to configure shared throttling storage, SMTP, secrets, and HTTPS.

## Intended scope

- Registration and email verification.
- Email and/or username login, logout, password reset, password change, and a
  current-user endpoint.
- First-class support for the host's default or custom Django user model, with
  explicit safe field selection for registration, profile responses, updates, and
  token claims.
- DRF SimpleJWT access and refresh tokens, including either HMAC or RSA key
  configuration.
- Link, high-entropy token, Redis-backed email OTP, or no email verification.
- OpenAPI 3 schema annotations and mountable Swagger UI routes.

OAuth, social sign-in, OIDC, SAML, passkeys, tenancy, and full RBAC are explicitly
outside this package's first release scope.

## Installation

```bash
# After the package is published to PyPI:
python -m pip install freehand-kit-auth

# For Redis-backed OTP verification:
python -m pip install "freehand-kit-auth[redis]"

# For RSA JWT signing and verification:
python -m pip install "freehand-kit-auth[crypto]"
```

```python
INSTALLED_APPS = [
    # Host applications own the rest of this list.
    "rest_framework",
    "drf_spectacular",
    "rest_framework_simplejwt.token_blacklist",
    "fk_auth",
]
```

The host application sets `FREEHAND_KIT_AUTH` in its Django settings and includes the
package URLs. See [the configuration guide](docs/configuration.md) for the working
contract. The library does not read `.env` files itself; the host resolves environment
variables before constructing its Django settings.

## Development

```bash
cd freehand-kit-auth
python -m pip install -e ".[dev]"
pytest
ruff check .
python -m build
twine check dist/*
```

The GitHub Actions workflow runs the supported Python/Django matrix, linting, typing,
package validation, dependency auditing, and a PostgreSQL/Redis/Mailpit integration test.

## Project status

The current package implements registration, configurable email verification/resend,
email/username login, JWT refresh/verify/logout, password reset and change, and a
safe custom-user `me` endpoint. Roles, email-change, account deletion, OAuth/SSO,
and MFA remain deferred capabilities.

## License

MIT. See [LICENSE](LICENSE).
