Skip to content

Commit

Permalink
fix debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
pcmxgti committed Dec 1, 2023
1 parent b71ea26 commit 0f3a343
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tokendito/okta.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,6 @@ def send_saml_request(saml_request):
# Use the HTTP client to make a GET request
response = HTTP_client.get(url, params=payload, headers=headers)

logger.debug(f"{base64.b64decode(payload['SAMLRequest'])}")

# Extract relevant information from the response to form the saml_response dictionary
saml_response = {
"response": extract_saml_response(response.text, raw=True),
Expand All @@ -183,6 +181,7 @@ def send_saml_request(saml_request):
# Mask sensitive values for logging purposes
user.add_sensitive_value_to_be_masked(saml_response["response"])

logger.debug(f"SAML response is {saml_response}")
# Return the formed SAML response
return saml_response

Expand Down Expand Up @@ -287,6 +286,7 @@ def send_saml_response(config, saml_response):
logger.error(
f"Session cookie idx for {config.okta['org']} not found. Please file a bug."
)
logger.debug(f"Response: {response.headers}")
logger.debug(f"Response: {response.text}")
sys.exit(2)

Expand Down Expand Up @@ -602,7 +602,7 @@ def get_oauth2_configuration(config):
headers = {"accept": "application/json"}
response = HTTP_client.get(url, headers=headers)
logger.debug(f"Authorization Server info: {response.json()}")
# todo: handle errors.n
# TODO: handle errors
oauth2_config = response.json()
oauth2_config["org"] = config.okta["org"]
oauth2_config["client_id"] = get_client_id(config)
Expand Down Expand Up @@ -1071,7 +1071,7 @@ def mfa_challenge(config, headers, primary_auth):
:param primary_auth: primary authentication
:return: Okta MFA Session token after the successful entry of the code
"""
logger.debug("Handle user MFA challenges")
logger.debug("Handle user MFA challenge")
try:
mfa_options = primary_auth["_embedded"]["factors"]
except KeyError as error:
Expand Down

0 comments on commit 0f3a343

Please sign in to comment.