Skip to main content

Django app for Keycloak OAuth2 authentication with DRF.

Project description

django-drf-keycloak-auth

When using Django, DRF, and Keycloak for authentication and permission management, django-drf-keycloak-auth can make your work easier.

Getting Started

pip install django-drf-keycloak-auth

OR

uv add django-drf-keycloak-auth

Usage

Examples

Deploy project(memo for developer)

setuptools version

The latest setuptools(version 80.9.0) produces .whl files with a METADATA version of 2.4. You can check this by running:

unzip -p dist/*.whl '*/METADATA' | sed -n '1,160p'

Note that TestPyPI and TestPyPI only supports METADATA versions 1.0–2.2. Therefore, if you plan to publish your package to TestPyPI or TestPyPI, you should not use the latest setuptools.

Deploy to TestPyPI

Depending on the network environment, you may need to use a proxy.

# https://test.pypi.org/
expect interactive_deploy_test.expect

Install django-drf-keycloak-auth from TestPyPI.

uv pip uninstall django-drf-keycloak-auth

uv pip install --no-cache-dir \
  --index-url https://pypi.org/simple \
  --extra-index-url https://test.pypi.org/simple \
  --index-strategy unsafe-best-match \
  django-drf-keycloak-auth==0.0.1

OR

uv pip install --index-url https://test.pypi.org/simple django-drf-keycloak-auth==0.0.1

Deploy to PyPI

Depending on the network environment, you may need to use a proxy.

# https://pypi.org/
expect interactive_deploy.expect

How to mark a version as yanked

twine yank <package_name> --version <version> --reason "Reason this release was yanked: Yanked due to <reason>"

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[0.0.1] - 2025-10-15

  • First commit(Only for test)

[0.0.2] - 2025-10-17

  • Add drf-spectacular support

  • Update auth api

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_drf_keycloak_auth-0.0.2.tar.gz (11.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_drf_keycloak_auth-0.0.2-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

Details for the file django_drf_keycloak_auth-0.0.2.tar.gz.

File metadata

  • Download URL: django_drf_keycloak_auth-0.0.2.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for django_drf_keycloak_auth-0.0.2.tar.gz
Algorithm Hash digest
SHA256 e5252d3c42db33e2e1048a5f844efef4f4fd5271024f7bf3fa2747e489acc564
MD5 53f7218c0b952afd832e1955f9fc5fff
BLAKE2b-256 5f02c586ecf87ff338f9a24bc4c75e7b38305ee2d29bf12c375d46ad78e355c6

See more details on using hashes here.

File details

Details for the file django_drf_keycloak_auth-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for django_drf_keycloak_auth-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 675d160b988e35a74731f6a3239c062fb10f9f441588b01e61aaad92eff9e753
MD5 3de17eaf6ef140f394a343fa4ce88a3c
BLAKE2b-256 2ed0a4b7e466edc041e736fd7da094ba6e6fb63040fbe103f17e2879dc5f8cef

See more details on using hashes here.

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