Metadata-Version: 2.4
Name: wristband-django-auth
Version: 1.0.2
Summary: SDK for integrating your Python Django application with Wristband. Handles user authentication, session management, and token management. Optional Django Rest Framework (DRF) support included.
Author-email: Wristband <support@wristband.dev>
License-Expression: MIT
Project-URL: Homepage, https://wristband.dev
Project-URL: Repository, https://github.com/wristband-dev/django-auth
Project-URL: Documentation, https://docs.wristband.dev
Keywords: api,auth,authentication,authorization,django,jwt,multi-tenant,multi-tenancy,oauth,oidc,sdk,secure,security,sso,wristband
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Security
Classifier: Development Status :: 4 - Beta
Classifier: Framework :: Django
Classifier: Framework :: Django :: 4.2
Classifier: Framework :: Django :: 5.0
Classifier: Framework :: Django :: 5.1
Classifier: Framework :: Django :: 5.2
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: cryptography>=44.0.3
Requires-Dist: Django>=4.2
Requires-Dist: httpx>=0.24.0
Requires-Dist: wristband-python-jwt==0.1.1
Provides-Extra: drf
Requires-Dist: djangorestframework>=3.15.0; extra == "drf"
Provides-Extra: all
Requires-Dist: djangorestframework>=3.15.0; extra == "all"
Provides-Extra: dev
Requires-Dist: djangorestframework>=3.15.0; extra == "dev"
Requires-Dist: setuptools>=61; extra == "dev"
Requires-Dist: pytest<9.0.0,>=8.2.0; extra == "dev"
Requires-Dist: pytest-cov<6.0.0,>=5.0.0; extra == "dev"
Requires-Dist: pytest-httpx>=0.21.0; extra == "dev"
Requires-Dist: mypy>=1.10.0; extra == "dev"
Requires-Dist: types-jsonschema; extra == "dev"
Requires-Dist: django-stubs; extra == "dev"
Requires-Dist: flake8<7.0.0,>=6.0.0; extra == "dev"
Requires-Dist: flake8-pyproject>=1.2.0; extra == "dev"
Requires-Dist: pip-audit>=2.0.0; extra == "dev"
Requires-Dist: bandit>=1.7.0; extra == "dev"
Requires-Dist: build>=0.10.0; extra == "dev"
Requires-Dist: twine>=4.0.0; extra == "dev"
Requires-Dist: black>=23.0.0; extra == "dev"
Requires-Dist: isort>=5.12.0; extra == "dev"
Dynamic: license-file

# Wristband Multi-Tenant Authentication SDK for Python Django

Wristband provides enterprise-ready auth that is secure by default, truly multi-tenant, and ungated for small businesses.

- Website: [Wristband Website](https://wristband.dev)
- Documentation: [Wristband Docs](https://docs.wristband.dev/)

For detailed setup instructions and usage guidelines, visit the project's GitHub repository.

- [Django Auth SDK - GitHub](https://github.com/wristband-dev/django-auth)


## Details

This SDK facilitates seamless interaction with Wristband for user authentication within multi-tenant Django applications. It follows OAuth 2.1 and OpenID standards and is supported for Python 3.10+. Key functionalities encompass the following:

- Initiating a login request by redirecting to Wristband.
- Receiving callback requests from Wristband to complete a login request.
- Retrieving all necessary JWT tokens and userinfo to start an application session.
- Logging out a user from the application by revoking refresh tokens and redirecting to Wristband.
- Checking for expired access tokens and refreshing them automatically, if necessary.
- Function-based view decorators and class-based view mixins for Django authentication.
- Multi-strategy authentication for API endpoints (sessions + JWTs).
- Django REST Framework authentication class support for session and JWT bearer token strategies.
- Authentication backend for syncing Wristband users to Django's User model.
- Encrypted cookie-based session engine for secure, stateless session management.

You can learn more about how authentication works in Wristband in our documentation:

- [Backend Server Auth Integration](https://docs.wristband.dev/docs/backend-server-integration)
- [Login Workflow In Depth](https://docs.wristband.dev/docs/login-workflow)

## Questions

Reach out to the Wristband team at <support@wristband.dev> for any questions regarding this SDK.
