Skip to main content

django-suap-auth

PyPI Version Python CI and PyPI Deploy Python Versions Django Versions License: MIT Tests pre-commit Coverage

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.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-suap-auth 1.3.1
File Size Uploaded
django_suap_auth-1.3.1.tar.gz 40.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-suap-auth 1.3.1
File Interpreter ABI Platform
django_suap_auth-1.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 91.7 kB

Release files / django_suap_auth-1.3.1.tar.gz

Download URL django_suap_auth-1.3.1.tar.gz
Size 40.7 kB
Tags Source
SHA-256 checksum
How to use checksums
bce076fceab1b1e4aeb6b03e43cde7bc4560396313f19506d84835b6dca65258
BLAKE2b-256 checksum
How to use checksums
5a87b123587c42edbf22b129d8d4b3d44beb99bb4f212c80d85420cb72fb1144
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 21, 2026.

Transparency log

Release files / django_suap_auth-1.3.1-py3-none-any.whl

Download URL django_suap_auth-1.3.1-py3-none-any.whl
Size 51.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b1f3bce8b1397ca7b9070baffd7718cc93797c970260e15863cf98fdac0c7019
BLAKE2b-256 checksum
How to use checksums
7bedde5cb7e436e345103aafc8b3df1720046af450a646cb9205dc70b8c4f4e2
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 21, 2026.

Transparency log

Release history Release notifications | RSS feed

1.8.9

2 release files

1.8.8

2 release files

1.8.7

2 release files

1.8.6

2 release files

1.8.5

2 release files

1.8.4

2 release files

1.8.3

2 release files

1.8.2

2 release files

1.8.1

2 release files

1.8.0

2 release files

1.7.1

2 release files

1.7.0

2 release files

1.6.0

2 release files

1.5.3

2 release files

1.5.2

2 release files

1.5.1

2 release files

1.5.0

2 release files

1.4.0

2 release files

This release

1.3.1 This release

2 release files

1.3.0

2 release files

1.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page