Skip to content

Fix upgrade to authlib 1.7.0#1399

Open
malcolmbaig wants to merge 2 commits intomainfrom
mb-authlib-debug--20260429--fix
Open

Fix upgrade to authlib 1.7.0#1399
malcolmbaig wants to merge 2 commits intomainfrom
mb-authlib-debug--20260429--fix

Conversation

@malcolmbaig
Copy link
Copy Markdown
Contributor

@malcolmbaig malcolmbaig commented May 1, 2026

Description

authlib 1.7.0 removed DjangoOAuth2App.create_load_key() as part of
its internal migration to joserfc. Re-implement the deleted method as a
local helper _create_cis2_key_loader, preserving the JWKS force-refresh
on kid miss to handle CIS2 key rotation without a process restart.

This commit also adds unit tests for the back-channel logout view.

Jira link

https://nhsd-jira.digital.nhs.uk/browse/DTOSS-12826

Review notes

Review checklist

  • Check database queries are correctly scoped to current_provider
  • If this changes the gateway API (/api/v1/), confirm whether it is a breaking change — if so, a new major version (/api/v2/) is required (see ADR-006)

authlib 1.7.0 removed `DjangoOAuth2App.create_load_key()` as part of
its internal migration to joserfc. Re-implement the deleted method as a
local helper `_create_cis2_key_loader`, preserving the JWKS force-refresh
on kid miss to handle CIS2 key rotation without a process restart.

This commit also adds unit tests for the back-channel logout view.
@malcolmbaig malcolmbaig force-pushed the mb-authlib-debug--20260429--fix branch from 67cbb18 to c3f0011 Compare May 1, 2026 12:49
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 1, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant