add in debug logging when failing to login to help debug auth failures

This commit is contained in:
jasquat 2023-02-14 09:59:29 -05:00
parent 2eab56525a
commit 6e49fcc975
4 changed files with 13 additions and 9 deletions

View File

@ -3670,4 +3670,4 @@
"clientPolicies" : {
"policies" : [ ]
}
}
}

View File

@ -577,7 +577,6 @@ def process_instance_task_list(
subprocess_state_overrides = {}
for step_detail in step_details:
if step_detail.task_id in tasks:
# task_ids_in_use.append(step_detail.task_id)
task_data = (
step_detail.task_json["task_data"] | step_detail.task_json["python_env"]
)

View File

@ -1,7 +1,5 @@
"""User."""
import ast
from flask import make_response
from flask import jsonify
import base64
import json
import re
@ -14,6 +12,8 @@ import flask
import jwt
from flask import current_app
from flask import g
from flask import jsonify
from flask import make_response
from flask import redirect
from flask import request
from werkzeug.wrappers import Response

View File

@ -175,13 +175,18 @@ class AuthenticationService:
elif now < decoded_token["iat"]:
valid = False
if not valid:
return False
if now > decoded_token["exp"]:
if valid and now > decoded_token["exp"]:
raise TokenExpiredError("Your token is expired. Please Login")
else:
current_app.logger.error(
"TOKEN INVALID: details: "
f"DECODED_TOKEN: {decoded_token} "
f"SERVER_URL: {cls.server_url()} "
f"CLIENT_ID: {cls.client_id()} "
f"NOW: {now}"
)
return True
return valid
@staticmethod
def store_refresh_token(user_id: int, refresh_token: str) -> None: