From 59faa8fd42bc2a9ae0c07e66f7a3a1e5ea8f066f Mon Sep 17 00:00:00 2001 From: Kenneth Kehl <@kkehl@flexion.us> Date: Fri, 15 Dec 2023 14:20:54 -0800 Subject: [PATCH] some debugging --- app/main/views/sign_in.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/main/views/sign_in.py b/app/main/views/sign_in.py index 5e6899eae..9df748343 100644 --- a/app/main/views/sign_in.py +++ b/app/main/views/sign_in.py @@ -52,13 +52,14 @@ def _get_access_token(code, state): # JWT expiration time (10 minute maximum) "exp": int(time.time()) + (10 * 60), } - + current_app.logger.warning(f"Here is the raw payload {payload}") token = jwt.encode(payload, keystring, algorithm="RS256") base_url = f"{access_token_url}?" cli_assert = f"client_assertion={token}" cli_assert_type = "client_assertion_type=urn%3Aietf%3Aparams%3Aoauth%3Aclient-assertion-type%3Ajwt-bearer" code_param = f"code={code}" url = f"{base_url}{cli_assert}&{cli_assert_type}&{code_param}&grant_type=authorization_code" + current_app.logger.info(f"This is the url we use to get the access token: {url}") headers = {"Authorization": "Bearer %s" % token} response = requests.post(url, headers=headers) current_app.logger.info(f"GOT A RESPONSE {response.json()}")