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.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.3.0
File Size Uploaded
django_suap_auth-1.3.0.tar.gz 37.1 kB Details

Built distribution (wheel)

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

Total release size: 67.5 kB

Release files / django_suap_auth-1.3.0.tar.gz

Download URL django_suap_auth-1.3.0.tar.gz
Size 37.1 kB
Tags Source
SHA-256 checksum
How to use checksums
c11bb686cf1a6c22e4f4d01bcc144d7d86d85ffde9d63f2767cde75f762c8652
BLAKE2b-256 checksum
How to use checksums
8622898e7fab81984e41745b4eaaf0f4c6ef2e42f0b1478d16f3e6dcc1645841
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 19, 2026.

Transparency log

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

Download URL django_suap_auth-1.3.0-py3-none-any.whl
Size 30.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b58d1ac3769a823abf685fb3bf6029bc5774f0ac7b8e8a5a52edb985f74e23f8
BLAKE2b-256 checksum
How to use checksums
a3a716c3d401e35ec444d20fd21738e0fd466b54e27be3e79ebb306d3f31804b
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 19, 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

1.3.1

2 release files

This release

1.3.0 This release

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