django-suap-auth
Backend de autenticação OAuth2 do Django para SUAP (Sistema Unificado de Administração Pública), o sistema de gestão acadêmica do IFRN, hospedado em suap.ifrn.edu.br.
Instalação
uv add django-suap-auth
# ou com pip:
# pip install django-suap-auth
Início Rápido
# settings.py
INSTALLED_APPS = [
# ...
"django_suap_auth",
]
AUTHENTICATION_BACKENDS = [
"django_suap_auth.backends.SuapAuthBackend",
"django.contrib.auth.backends.ModelBackend",
]
SUAP_AUTH = {
"CLIENT_ID": "your-client-id",
"CLIENT_SECRET": "your-client-secret",
"REDIRECT_URI": "https://yourapp.example.com/auth/suap/callback/",
"SCOPES": ["identificacao", "email"], # opcional
}
LOGIN_REDIRECT_URL = "/dashboard/"
LOGIN_URL = "/login/"
# urls.py
from django.urls import path, include
urlpatterns = [
# Fluxo OAuth2 padrão
path("auth/suap/", include("django_suap_auth.urls")),
# Entrypoints JWT do SUAP (/api/token/pair, /api/token/refresh, /api/token/verify) (opcional)
path("api/token/", include("django_suap_auth.jwt_urls")),
...,
]
<!-- template -->
<a href="{% url 'suap_auth:login' %}">Login com SUAP</a>
Escopos Disponíveis
| Escopo | Descrição |
|---|---|
identificacao |
Identificação básica (matricula, nome, campus) |
email |
Endereço de email |
documentos_pessoais |
Documentos pessoais (CPF, RG) |
dados_academicos |
Dados acadêmicos (curso, notas, situação) |
dados_pessoais |
Dados pessoais (data de nascimento, nacionalidade) |
reitoria |
Dados de nível institucional |
Documentação
Documentação completa disponível no diretório docs/ e nas GitHub Pages do projeto.
Licença
MIT © 2026 kelsoncm
Metadata
Release files for django-suap-auth 1.5.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django_suap_auth-1.5.2.tar.gz | 44.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_suap_auth-1.5.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 101.0 kB
Release files / django_suap_auth-1.5.2.tar.gz
| Download URL | django_suap_auth-1.5.2.tar.gz |
|---|---|
| Size | 44.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c33ff7543ef10c625d519b069a7590eef0bc385ebdb86dbd1d0b9f1af190dd86
|
|
BLAKE2b-256 checksum How to use checksums |
c4af725d59bd8d17a04f7465639845a386afcd2cff6028b0d2adba78c2e266f5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 27, 2026.
Transparency logRelease files / django_suap_auth-1.5.2-py3-none-any.whl
| Download URL | django_suap_auth-1.5.2-py3-none-any.whl |
|---|---|
| Size | 56.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
86d937b796b1813a5fad0a5d82f57ac6df71cc214c398f1c2d3c80bbe03dd0fc
|
|
BLAKE2b-256 checksum How to use checksums |
50510dfb6b479d49fc8fb1091dd3a6d034eb0c54e1fdc37ab9efbe934b25f836
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 27, 2026.
Transparency log