From d66619a01c7389c9f01530a01500f8ceac241daf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89loi=20Rivard?= Date: Wed, 17 May 2023 09:29:32 +0200 Subject: [PATCH] OIDC lifetimes are not casted to string anymore --- canaille/oidc/oauth.py | 2 +- tests/oidc/conftest.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/canaille/oidc/oauth.py b/canaille/oidc/oauth.py index 5879f74c..a162dc56 100644 --- a/canaille/oidc/oauth.py +++ b/canaille/oidc/oauth.py @@ -151,7 +151,7 @@ def save_authorization_code(code, request): scope=scope, nonce=nonce, issue_date=now, - lifetime=str(AUTHORIZATION_CODE_LIFETIME), + lifetime=AUTHORIZATION_CODE_LIFETIME, challenge=request.data.get("code_challenge"), challenge_method=request.data.get("code_challenge_method"), ) diff --git a/tests/oidc/conftest.py b/tests/oidc/conftest.py index 1e801546..15e33ff0 100644 --- a/tests/oidc/conftest.py +++ b/tests/oidc/conftest.py @@ -153,7 +153,7 @@ def authorization(testclient, user, client, slapd_connection): scope="openid profile", nonce="nonce", issue_date=datetime.datetime(2020, 1, 1, tzinfo=datetime.timezone.utc), - lifetime="3600", + lifetime=3600, challenge="challenge", challenge_method="method", revokation="", @@ -175,7 +175,7 @@ def token(testclient, client, user, slapd_connection): refresh_token=gen_salt(48), scope="openid profile", issue_date=datetime.datetime.now(datetime.timezone.utc), - lifetime=str(3600), + lifetime=3600, ) t.save() yield t