From a45392c66ff1099f24c96f524539273237c90c9e Mon Sep 17 00:00:00 2001 From: FrenchGithubUser Date: Thu, 26 Mar 2026 17:47:18 +0100 Subject: [PATCH 1/2] chore: bump python version --- .github/workflows/python.yml | 2 +- pyproject.toml | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 8f0685c..9bd2c0a 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -24,7 +24,7 @@ jobs: contents: read strategy: matrix: - python-version: ["3.9", "3.10", "3.11"] + python-version: ["3.11", "3.12", "3.13"] steps: - uses: actions/checkout@v4 diff --git a/pyproject.toml b/pyproject.toml index 547d110..d1fa894 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,9 +17,8 @@ authors = [ classifiers = [ "Development Status :: 4 - Beta", "Programming Language :: Python", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", ] From aaca46e689c76a4a878a576f47ccb7232cdba649 Mon Sep 17 00:00:00 2001 From: FrenchGithubUser Date: Thu, 26 Mar 2026 17:34:32 +0100 Subject: [PATCH 2/2] release: v0.13.0 --- CHANGELOG.md | 18 ++++++++++++++++++ pyproject.toml | 2 +- .../token_authenticator.py | 16 ++++++++-------- 3 files changed, 27 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f63d64..c012ecb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,24 @@ All notable changes to this project will be documented in this file. +## [0.13.0] - 2026-03-26 + +### Features + +- feat: trigger CI actions (that are triggered on PRs) in merge queue (#76) (FrenchGithubUser) + +### Miscellaneous Tasks + +- chore: bump python version (FrenchGithubUser) +- chore: the synapse team is now the maintainer of this project, update CODEOWNERS and remove obsolete file (FrenchGithubUser) +- chore: twisted dependency doesn't need to be pinned anymore (FrenchGithubUser) +- ci: remove unnecessary branches filter (#77) (FrenchGithubUser) +- fix: update tests to work with breaking changes in recent synapse versions (FrenchGithubUser) + +### Refactoring + +- refactor: Add more logs (Matheus Zaniolo) + ## [0.12.0] - 2025-07-31 ### Features diff --git a/pyproject.toml b/pyproject.toml index d1fa894..2c9e252 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,7 +27,7 @@ dependencies = [ "twisted", "Twisted", ] -version = "0.12.0" +version = "0.13.0" [project.urls] Documentation = "https://github.com/famedly/synapse-token-authenticator" diff --git a/synapse_token_authenticator/token_authenticator.py b/synapse_token_authenticator/token_authenticator.py index c049d1a..e847fa2 100644 --- a/synapse_token_authenticator/token_authenticator.py +++ b/synapse_token_authenticator/token_authenticator.py @@ -22,30 +22,30 @@ import synapse from jwcrypto import jwk, jwt -from jwcrypto.jwk import JWKSet from jwcrypto.common import JWException, json_decode +from jwcrypto.jwk import JWKSet from synapse.api.errors import HttpResponseException from synapse.module_api import ModuleApi from synapse.types import UserID -from twisted.web import resource from twisted.internet import defer +from twisted.web import resource from synapse_token_authenticator.config import TokenAuthenticatorConfig from synapse_token_authenticator.utils import ( - get_oidp_metadata, - basic_auth, - validate_scopes, + MetadataResource, all_list_elems_are_equal_return_the_elem, + basic_auth, + get_oidp_metadata, get_path_in_dict, if_not_none, - MetadataResource, + validate_scopes, ) logger = logging.getLogger(__name__) class TokenAuthenticator: - __version__ = "0.0.0" + __version__ = "0.13.0" def __init__(self, config: dict, account_handler: ModuleApi): self.api = account_handler @@ -580,7 +580,7 @@ def get_from_set(set_): user_id = await self.api.register_user(localpart, admin=bool(admin)) logger.debug( - f"User '{localpart}' created as '{ 'Admin' if bool(admin) else 'User'}'" + f"User '{localpart}' created as '{'Admin' if bool(admin) else 'User'}'" ) if email: