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
11 changes: 11 additions & 0 deletions .claude/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"version": "0.0.1",
"configurations": [
{
"name": "landing",
"runtimeExecutable": "python",
"runtimeArgs": ["-m", "http.server", "4173", "--directory", "landing"],
"port": 4173
}
]
}
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
permissions:
contents: read
with:
python-version: "3.14"
python-version: "3.15"
# Exported from uv.lock with every dependency group, so mypy finds
# django-stubs and pytest finds fakeredis. `make requirements` rebuilds it;
# the `lockfile` job below fails if someone forgets.
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Deploy landing page to GitHub Pages

on:
push:
branches: [main]
paths: [landing/**, .github/workflows/pages.yml]
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: pages
cancel-in-progress: true

jobs:
deploy:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v4
- uses: actions/configure-pages@v5
- uses: actions/upload-pages-artifact@v3
with:
path: landing
- id: deployment
uses: actions/deploy-pages@v4
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ uses [Semantic Versioning](https://semver.org/).

## [Unreleased]

## [0.3.1] - 2026-11-30

### Added

- A static landing page under `landing/`, published to GitHub Pages.

## [0.3.0] - 2026-11-26

### Added
Expand Down Expand Up @@ -80,7 +86,8 @@ The first release.
- A Docker image, a Compose stack, and CI through the shared
`ci-workflows`.

[Unreleased]: https://github.com/CtrlAltDevelop/oauth-dpop-server/compare/v0.3.0...HEAD
[Unreleased]: https://github.com/CtrlAltDevelop/oauth-dpop-server/compare/v0.3.1...HEAD
[0.3.1]: https://github.com/CtrlAltDevelop/oauth-dpop-server/compare/v0.3.0...v0.3.1
[0.3.0]: https://github.com/CtrlAltDevelop/oauth-dpop-server/compare/v0.2.0...v0.3.0
[0.2.0]: https://github.com/CtrlAltDevelop/oauth-dpop-server/compare/v0.1.0...v0.2.0
[0.1.0]: https://github.com/CtrlAltDevelop/oauth-dpop-server/releases/tag/v0.1.0
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ on every push.
Django 5.2 or 6.1, Django Ninja, PostgreSQL, Redis and `joserfc`. There are no
hand-rolled cryptographic primitives.

**[Landing page →](https://ctrlaltdevelop.github.io/oauth-dpop-server/)**

## What it does

- **Authorization Code with mandatory PKCE.** S256 only; `plain` is refused.
Expand Down
2 changes: 1 addition & 1 deletion authserver/authorization.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def as_session_data(self) -> dict[str, Any]:
return asdict(self)

@classmethod
def from_session_data(cls, data: dict[str, Any]) -> "AuthorizationRequest":
def from_session_data(cls, data: dict[str, Any]) -> AuthorizationRequest:
return cls(**data)


Expand Down
2 changes: 1 addition & 1 deletion authserver/clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def _basic_credentials(header: str) -> tuple[str, str] | None:
return None
try:
decoded = base64.b64decode(value.strip(), validate=True).decode("utf-8")
except (ValueError, UnicodeDecodeError):
except ValueError, UnicodeDecodeError:
raise OAuthError(
"invalid_client", "malformed Basic credentials", status=401, headers=_BASIC_CHALLENGE
) from None
Expand Down
2 changes: 1 addition & 1 deletion authserver/lookup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def find_access_token(token: str) -> AccessToken | None:
decoded = jwt.decode(
token, KeySet.import_key_set(published_jwks()), algorithms=[SIGNING_ALGORITHM]
)
except (JoseError, ValueError):
except JoseError, ValueError:
return None
if decoded.header.get("typ") != ACCESS_TOKEN_TYP:
return None
Expand Down
6 changes: 3 additions & 3 deletions authserver/redis.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
from django.conf import settings
from redis import Redis

_client: "Redis | None" = None
_client: Redis | None = None


def get_redis() -> "Redis":
def get_redis() -> Redis:
"""One client per process; redis-py pools connections underneath it."""
global _client
if _client is None:
_client = Redis.from_url(settings.REDIS_URL)
return _client


def use_redis(client: "Redis | None") -> None:
def use_redis(client: Redis | None) -> None:
"""Replace the process's connection. The test suite points it at fakeredis."""
global _client
_client = client
2 changes: 1 addition & 1 deletion dpop/nonce.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def is_valid(self, nonce: str) -> bool:


class RedisNonceStore:
def __init__(self, redis: "Redis", *, rotation: int, namespace: str = "dpop:nonce") -> None:
def __init__(self, redis: Redis, *, rotation: int, namespace: str = "dpop:nonce") -> None:
self._redis = redis
self._rotation = rotation
self._current_key = f"{namespace}:current"
Expand Down
2 changes: 1 addition & 1 deletion dpop/replay.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class RedisReplayCache:
which two concurrent requests carrying the same proof could both pass.
"""

def __init__(self, redis: "Redis", namespace: str = "dpop:jti") -> None:
def __init__(self, redis: Redis, namespace: str = "dpop:jti") -> None:
self._redis = redis
self._namespace = namespace

Expand Down
Loading
Loading