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.6.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.6.0
File Size Uploaded
django_suap_auth-1.6.0.tar.gz 49.9 kB Details

Built distribution (wheel)

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

Total release size: 113.0 kB

Release files / django_suap_auth-1.6.0.tar.gz

Download URL django_suap_auth-1.6.0.tar.gz
Size 49.9 kB
Tags Source
SHA-256 checksum
How to use checksums
16c99e554b20b1be3dc484d8cc73cf9d8c2ccf1d973f28189750ad5541ab4eb1
BLAKE2b-256 checksum
How to use checksums
8b7478d989449bba5b7998642f5f0ff5047c6f1eed66e34a6e04aadd966acfbb
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

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

Download URL django_suap_auth-1.6.0-py3-none-any.whl
Size 63.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3e6d61170d6a0ee96d8f7ac142be91b8ae0f8590142fb278ee3a24308f5b7a38
BLAKE2b-256 checksum
How to use checksums
429cd9c2a5b54f453cf8e628ec2f6b866b213187ed22eb04c7cb9c828b764251
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

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

This release

1.6.0 This release

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

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