Metadata-Version: 2.5
Name: grantor-django
Version: 0.1.3
Summary: Sign in with Grantor from Django — views, an authentication backend, DRF and the admin.
Project-URL: Homepage, https://grantor.id
Project-URL: Documentation, https://docs.grantor.id
Project-URL: Source, https://github.com/Grantor-id/grantor-python
Project-URL: Issues, https://github.com/Grantor-id/grantor-python/issues
Author: Allure Labs
License-Expression: MIT
Keywords: django,grantor,oauth2,oidc,openid-connect,sso
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Framework :: Django :: 4.2
Classifier: Framework :: Django :: 5.0
Classifier: Framework :: Django :: 5.1
Classifier: Framework :: Django :: 5.2
Classifier: Intended Audience :: Developers
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: Topic :: Security
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: django<6,>=4.2
Requires-Dist: grantor<0.2,>=0.1.3
Provides-Extra: admin
Provides-Extra: drf
Requires-Dist: djangorestframework>=3.14; extra == 'drf'
Description-Content-Type: text/markdown

# `grantor-django`

Sign in with [Grantor](https://grantor.id) from Django — an OAuth 2.1 /
OpenID Connect provider.

```sh
pip install grantor-django          # session sign-in
pip install grantor-django[drf]     # + a DRF API that answers to an access token
pip install grantor-django[admin]   # + a Django admin with no local password
```

```python
INSTALLED_APPS = [..., "grantor_django"]

GRANTOR_ISSUER = "https://acme.api.grantor.id"
GRANTOR_CLIENT_ID = env("GRANTOR_CLIENT_ID")
GRANTOR_CLIENT_SECRET = env("GRANTOR_CLIENT_SECRET")
GRANTOR_CALLBACK_BASE_URL = "https://app.example.com"
```

```python
urlpatterns = [path("auth/", include("grantor_django.urls"))]
```

Every endpoint — authorization, token, JWKS, end-session — is read from the
issuer's discovery document. The issuer is the only string you configure.

Documentation: [docs.grantor.id](https://docs.grantor.id).
Source and security policy: [Grantor-id/grantor-python](https://github.com/Grantor-id/grantor-python).

MIT. © Allure Labs.
