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

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.4.0
File Size Uploaded
django_suap_auth-1.4.0.tar.gz 41.9 kB Details

Built distribution (wheel)

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

Total release size: 95.1 kB

Release files / django_suap_auth-1.4.0.tar.gz

Download URL django_suap_auth-1.4.0.tar.gz
Size 41.9 kB
Tags Source
SHA-256 checksum
How to use checksums
80a211d81f37581291a24213af93f12d72ab60d9bc41c5bc1b473b2def2cecdf
BLAKE2b-256 checksum
How to use checksums
84976327576d8a04a5ee37908ad3131f1dcb3e4f585c2b39bf14412e6d01e747
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 26, 2026.

Transparency log

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

Download URL django_suap_auth-1.4.0-py3-none-any.whl
Size 53.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e0b460ee42274078a2068fcae775f730e13b43f1745f9b74193c014b346d3d33
BLAKE2b-256 checksum
How to use checksums
83b30842a98aca816ea22814d7b9710cb9323da08d6a7842fd43088ca4e3961c
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 26, 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

This release

1.4.0 This release

2 release files

1.3.1

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