mirror of
https://github.com/sartography/spiff-arena.git
synced 2025-01-27 01:40:48 +00:00
add in debug logging when failing to login to help debug auth failures
This commit is contained in:
parent
646d803be0
commit
35f8e6bfde
@ -3670,4 +3670,4 @@
|
|||||||
"clientPolicies" : {
|
"clientPolicies" : {
|
||||||
"policies" : [ ]
|
"policies" : [ ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -577,7 +577,6 @@ def process_instance_task_list(
|
|||||||
subprocess_state_overrides = {}
|
subprocess_state_overrides = {}
|
||||||
for step_detail in step_details:
|
for step_detail in step_details:
|
||||||
if step_detail.task_id in tasks:
|
if step_detail.task_id in tasks:
|
||||||
# task_ids_in_use.append(step_detail.task_id)
|
|
||||||
task_data = (
|
task_data = (
|
||||||
step_detail.task_json["task_data"] | step_detail.task_json["python_env"]
|
step_detail.task_json["task_data"] | step_detail.task_json["python_env"]
|
||||||
)
|
)
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
"""User."""
|
"""User."""
|
||||||
import ast
|
import ast
|
||||||
from flask import make_response
|
|
||||||
from flask import jsonify
|
|
||||||
import base64
|
import base64
|
||||||
import json
|
import json
|
||||||
import re
|
import re
|
||||||
@ -14,6 +12,8 @@ import flask
|
|||||||
import jwt
|
import jwt
|
||||||
from flask import current_app
|
from flask import current_app
|
||||||
from flask import g
|
from flask import g
|
||||||
|
from flask import jsonify
|
||||||
|
from flask import make_response
|
||||||
from flask import redirect
|
from flask import redirect
|
||||||
from flask import request
|
from flask import request
|
||||||
from werkzeug.wrappers import Response
|
from werkzeug.wrappers import Response
|
||||||
|
@ -175,13 +175,18 @@ class AuthenticationService:
|
|||||||
elif now < decoded_token["iat"]:
|
elif now < decoded_token["iat"]:
|
||||||
valid = False
|
valid = False
|
||||||
|
|
||||||
if not valid:
|
if valid and now > decoded_token["exp"]:
|
||||||
return False
|
|
||||||
|
|
||||||
if now > decoded_token["exp"]:
|
|
||||||
raise TokenExpiredError("Your token is expired. Please Login")
|
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
|
@staticmethod
|
||||||
def store_refresh_token(user_id: int, refresh_token: str) -> None:
|
def store_refresh_token(user_id: int, refresh_token: str) -> None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user