Fix: use POST for continueAuthentication endpoint (#317)

Volvo's PingFederate auth API now requires a POST request for the
continueAuthentication step after OTP verification. Using GET returns
the same OTP_VERIFIED state in a loop, never progressing to COMPLETED,
which causes a KeyError on 'authorizeResponse'.

Changing auth_session.get() to auth_session.post() with an empty JSON
body causes the API to return COMPLETED with the expected authorizeResponse.
This commit is contained in:
bazza2000
2026-03-23 07:43:53 +01:00
committed by GitHub
parent 515e1a8d27
commit 3a4160451c
+1 -1
View File
@@ -114,7 +114,7 @@ def authorize(renew_tokenfile=False):
def continue_auth(auth_session, data):
next_url = data["_links"]["continueAuthentication"]["href"].replace("http://", "https://") + "?action=continueAuthentication"
auth = auth_session.get(next_url)
auth = auth_session.post(next_url, data="{}")
if auth.status_code == 200:
return auth.json()