Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 36 additions & 25 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ jobs:
black:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: "3.12"
- uses: psf/black@stable
Expand All @@ -25,14 +25,16 @@ jobs:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
fetch-depth: 0 # Needed for versioningit to find the repo version
- uses: actions/setup-python@v5
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: python -m pip install --upgrade pip build

- name: Build python package
run: python -m build

Expand All @@ -42,20 +44,23 @@ jobs:
matrix:
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12", "3.13" ]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
fetch-depth: 0 # Needed for versioningit to find the repo version
- uses: actions/setup-python@v5
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: python -m pip install .[drf]
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
python-version: ${{ matrix.python-version }}
version: "0.9.8"

- name: Install dependencies
run: python -m pip install --upgrade pip
-r requirements/requirements-dev.in
-r requirements/requirements-test.in
run: uv pip install .[drf] -r requirements/requirements-dev.in -r requirements/requirements-test.in
env:
UV_SYSTEM_PYTHON: 1

- name: Run mypy
run: mypy --version && ./run_mypy.sh
Expand All @@ -64,20 +69,23 @@ jobs:
linting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
fetch-depth: 0 # Needed for versioningit to find the repo version
- uses: actions/setup-python@v5
- uses: actions/setup-python@v6
with:
python-version: "3.12"

- name: Install dependencies
run: python -m pip download .[drf]
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
python-version: "3.12"
version: "0.9.8"

- name: Install dependencies
run: python -m pip install --upgrade pip
-r requirements/requirements-dev.in
-r requirements/requirements-test.in
run: uv pip install .[drf] -r requirements/requirements-dev.in -r requirements/requirements-test.in
env:
UV_SYSTEM_PYTHON: 1

- name: Run flake8
run : flake8 --version && flake8 --extend-ignore=E501,E503,E203 --max-line-len=88 .
Expand Down Expand Up @@ -110,20 +118,23 @@ jobs:
matrix:
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12", "3.13" ]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
fetch-depth: 0 # Needed for versioningit to find the repo version
- uses: actions/setup-python@v5
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: python -m pip install .[drf]
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
python-version: ${{ matrix.python-version }}
version: "0.9.8"

- name: Install dependencies
run: python -m pip install --upgrade pip
-r requirements/requirements-dev.in
-r requirements/requirements-test.in
run: uv pip install .[drf] -r requirements/requirements-dev.in -r requirements/requirements-test.in
env:
UV_SYSTEM_PYTHON: 1

- name: Run unit tests
run: python3 run_tests.py
Expand Down
5 changes: 5 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
1.0.5
-----
- fix project name in sphinx metadata
- fix missing django 5.2 and python 3.13 classifiers in pyproject.toml

1.0.4
-----
- switch jwt library to pyjwt
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
</a>
</p>

This library allow *Single Sign On* (SSO) integration into Django through the [Open ID Connect (OIDC)]() protocol.
This library allows *Single Sign On* (SSO) integration into Django through the [Open ID Connect (OIDC)]() protocol.

It can be used to setup a Single Sign On using an identity provider (Keycloak, etc.) or to login using Google, Twitter, etc.
It can be used to set up a Single Sign On using an identity provider (Keycloak, etc.) or to login using Google, Twitter, etc.

**Warning**: this library has not been audited. However, we are based on [pyoidc](https://github.com/CZ-NIC/pyoidc/) which we believe is a sane OIDC implementation.

Expand Down Expand Up @@ -46,7 +46,7 @@ If you are not satisfied with the default configuration, take a look at the cook

## Acknowledgement

This library is built on the work of many others. First all, thanks to all the maintainers of [pyoidc](https://github.com/CZ-NIC/pyoidc/) as they did all the spec implementation. This library is mostly about glue between Django and *pyoidc*.
This library is built on the work of many others. First of all, thanks to all the maintainers of [pyoidc](https://github.com/CZ-NIC/pyoidc/) as they did all the spec implementation. This library is mostly about glue between Django and *pyoidc*.

We were also heavily inspired by:

Expand Down Expand Up @@ -78,15 +78,15 @@ INSTALLED_APPS = [
]
```

Don't forget to add the session middleware! Add in your `settings.py`:
Remember to add the session middleware! Add in your `settings.py`:

```python
MIDDLEWARE = [
"django.contrib.sessions.middleware.SessionMiddleware",
]
```

Now is time to run a migrate operation, as we create a database table ([read why here](https://django-pyoidc.readthedocs.io/latest/explanation.html#about-caching)). Run in your project dir:
Now is the time to run a migrate operation, as we create a database table ([read why here](https://django-pyoidc.readthedocs.io/latest/explanation.html#about-caching)). Run in your project dir:

```
./manage.py migrate
Expand All @@ -103,7 +103,7 @@ CACHES = {
}
```

Now you can pick an identity provider from the [available providers](https://django-pyoidc.readthedocs.io/latest/reference.html#providers). Providers class are a quick way to generate the library configuration and URLs. You can also configure the settings manually, but this is not recommended if you are not familiar with the OpendID Connect (OIDC) protocol.
Now you can pick an identity provider from the [available providers](https://django-pyoidc.readthedocs.io/latest/reference.html#providers). Provider classes are a quick way to generate the library configuration and URLs. You can also configure the settings manually, but this is not recommended if you are not familiar with the OpendID Connect (OIDC) protocol.

Add the following `DJANGO_PYOIDC` to your `settings.py`:

Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
django.setup()

copyright = "Free Software"
project = "Makina Django OIDC"
project = "django_pyoidc"
author = "Paul FLORENCE, Régis LEROY (regilero)"

# -- General configuration ---------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

Welcome to Makina Django OIDC's documentation!
Welcome to django_pyOIDC's documentation!
==============================================


Expand Down
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@ classifiers=["Topic :: Utilities",
"Framework :: Django :: 5",
"Framework :: Django :: 5.0",
"Framework :: Django :: 5.1",
"Framework :: Django :: 5.2",
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Security"
]
description="Authenticate your users using OpenID Connect (OIDC)"
Expand Down
Loading