Skip to main content

Django OAuth2 authentication backend for SUAP (IFRN academic management system)

Project description

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

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_CLIENT_ID = "your-client-id"
SUAP_CLIENT_SECRET = "your-client-secret"
SUAP_REDIRECT_URI = "https://yourapp.example.com/auth/suap/callback/"
SUAP_AUTH_SCOPES = ["identificacao", "email"]  # opcional
LOGIN_REDIRECT_URL = "/dashboard/"
LOGIN_URL = "/login/"
# urls.py
from django.urls import path, include

urlpatterns = [
    path("auth/suap/", include("django_suap_auth.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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_suap_auth-1.0.1.tar.gz (14.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_suap_auth-1.0.1-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

File details

Details for the file django_suap_auth-1.0.1.tar.gz.

File metadata

  • Download URL: django_suap_auth-1.0.1.tar.gz
  • Upload date:
  • Size: 14.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for django_suap_auth-1.0.1.tar.gz
Algorithm Hash digest
SHA256 880f81340cfe7a4d55818648170b832da5b1d4d8dbf6a2e7b4e381857d94082b
MD5 bfd744a21f1f46430ca8eee588d55c7a
BLAKE2b-256 f68733901c9bdd2634bc94b433e7fcf552a7d227ad7ec2415f30d058daef9647

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_suap_auth-1.0.1.tar.gz:

Publisher: publish.yml on kelsoncm/django-suap-auth

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file django_suap_auth-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for django_suap_auth-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 dfc347288fef3824a31dfce6c9841349ae732581f7eb29e1119e8fdd93af2c17
MD5 2e6a1e5a6e6cf4c762a3617a8a9cdf28
BLAKE2b-256 88777d407cc60f6abcc03bae50af3ac58f1f2a5df355855bbc1ae26bca549515

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_suap_auth-1.0.1-py3-none-any.whl:

Publisher: publish.yml on kelsoncm/django-suap-auth

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page