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