remove several debug print statements
This commit is contained in:
parent
aa6546656e
commit
4224916917
|
@ -188,9 +188,9 @@ def set_new_access_token_in_cookie(
|
||||||
if hasattr(tld, "new_id_token") and tld.new_id_token:
|
if hasattr(tld, "new_id_token") and tld.new_id_token:
|
||||||
response.set_cookie("id_token", tld.new_id_token)
|
response.set_cookie("id_token", tld.new_id_token)
|
||||||
|
|
||||||
if hasattr(tld, 'user_has_logged_out') and tld.user_has_logged_out:
|
if hasattr(tld, "user_has_logged_out") and tld.user_has_logged_out:
|
||||||
response.set_cookie("id_token", '', max_age=0)
|
response.set_cookie("id_token", "", max_age=0)
|
||||||
response.set_cookie("access_token", '', max_age=0)
|
response.set_cookie("access_token", "", max_age=0)
|
||||||
|
|
||||||
_clear_auth_tokens_from_thread_local_data()
|
_clear_auth_tokens_from_thread_local_data()
|
||||||
|
|
||||||
|
@ -259,13 +259,10 @@ def login_return(code: str, state: str, session_state: str) -> Optional[Response
|
||||||
AuthenticationService.store_refresh_token(
|
AuthenticationService.store_refresh_token(
|
||||||
user_model.id, auth_token_object["refresh_token"]
|
user_model.id, auth_token_object["refresh_token"]
|
||||||
)
|
)
|
||||||
redirect_url = (
|
redirect_url = state_redirect_url
|
||||||
f"{state_redirect_url}"
|
|
||||||
)
|
|
||||||
tld = current_app.config["THREAD_LOCAL_DATA"]
|
tld = current_app.config["THREAD_LOCAL_DATA"]
|
||||||
tld.new_access_token = auth_token_object["access_token"]
|
tld.new_access_token = auth_token_object["access_token"]
|
||||||
tld.new_id_token = auth_token_object["id_token"]
|
tld.new_id_token = auth_token_object["id_token"]
|
||||||
print(f"REDIRECT_URL: {redirect_url}")
|
|
||||||
return redirect(redirect_url)
|
return redirect(redirect_url)
|
||||||
|
|
||||||
raise ApiError(
|
raise ApiError(
|
||||||
|
|
|
@ -62,7 +62,6 @@ class AuthenticationService:
|
||||||
def open_id_endpoint_for_name(cls, name: str) -> str:
|
def open_id_endpoint_for_name(cls, name: str) -> str:
|
||||||
"""All openid systems provide a mapping of static names to the full path of that endpoint."""
|
"""All openid systems provide a mapping of static names to the full path of that endpoint."""
|
||||||
openid_config_url = f"{cls.server_url()}/.well-known/openid-configuration"
|
openid_config_url = f"{cls.server_url()}/.well-known/openid-configuration"
|
||||||
print(f"openid_config_url: {openid_config_url}")
|
|
||||||
if name not in AuthenticationService.ENDPOINT_CACHE:
|
if name not in AuthenticationService.ENDPOINT_CACHE:
|
||||||
response = requests.get(openid_config_url)
|
response = requests.get(openid_config_url)
|
||||||
AuthenticationService.ENDPOINT_CACHE = response.json()
|
AuthenticationService.ENDPOINT_CACHE = response.json()
|
||||||
|
@ -93,7 +92,6 @@ class AuthenticationService:
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def generate_state(redirect_url: str) -> bytes:
|
def generate_state(redirect_url: str) -> bytes:
|
||||||
"""Generate_state."""
|
"""Generate_state."""
|
||||||
print(f"REDIRECT_URL_HEY: {redirect_url}")
|
|
||||||
state = base64.b64encode(bytes(str({"redirect_url": redirect_url}), "UTF-8"))
|
state = base64.b64encode(bytes(str({"redirect_url": redirect_url}), "UTF-8"))
|
||||||
return state
|
return state
|
||||||
|
|
||||||
|
@ -102,7 +100,6 @@ class AuthenticationService:
|
||||||
) -> str:
|
) -> str:
|
||||||
"""Get_login_redirect_url."""
|
"""Get_login_redirect_url."""
|
||||||
return_redirect_url = f"{self.get_backend_url()}{redirect_url}"
|
return_redirect_url = f"{self.get_backend_url()}{redirect_url}"
|
||||||
print(f"RETURN_REDIRECT_URL_ONE: {return_redirect_url}")
|
|
||||||
login_redirect_url = (
|
login_redirect_url = (
|
||||||
self.open_id_endpoint_for_name("authorization_endpoint")
|
self.open_id_endpoint_for_name("authorization_endpoint")
|
||||||
+ f"?state={state}&"
|
+ f"?state={state}&"
|
||||||
|
|
|
@ -3,6 +3,7 @@ from typing import Any
|
||||||
from typing import List
|
from typing import List
|
||||||
from typing import Union
|
from typing import Union
|
||||||
|
|
||||||
|
from flask import current_app
|
||||||
from flask_bpmn.api.api_error import ApiError
|
from flask_bpmn.api.api_error import ApiError
|
||||||
from flask_bpmn.models.db import db
|
from flask_bpmn.models.db import db
|
||||||
|
|
||||||
|
@ -57,7 +58,7 @@ class ErrorHandlingService:
|
||||||
)
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
# hmm... what to do if a notification method fails. Probably log, at least
|
# hmm... what to do if a notification method fails. Probably log, at least
|
||||||
print(e)
|
current_app.logger.error(e)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def hanle_sentry_notification(_error: ApiError, _recipients: List) -> None:
|
def hanle_sentry_notification(_error: ApiError, _recipients: List) -> None:
|
||||||
|
|
|
@ -42,7 +42,6 @@ class MessageService:
|
||||||
message_type="receive", status="ready"
|
message_type="receive", status="ready"
|
||||||
).all()
|
).all()
|
||||||
for message_instance_send in message_instances_send:
|
for message_instance_send in message_instances_send:
|
||||||
# print(f"message_instance_send.id: {message_instance_send.id}")
|
|
||||||
# check again in case another background process picked up the message
|
# check again in case another background process picked up the message
|
||||||
# while the previous one was running
|
# while the previous one was running
|
||||||
if message_instance_send.status != "ready":
|
if message_instance_send.status != "ready":
|
||||||
|
|
|
@ -55,9 +55,6 @@ class ServiceTaskDelegate:
|
||||||
f"{connector_proxy_url()}/v1/do/{name}", json=params
|
f"{connector_proxy_url()}/v1/do/{name}", json=params
|
||||||
)
|
)
|
||||||
|
|
||||||
if proxied_response.status_code != 200:
|
|
||||||
print("got error from connector proxy")
|
|
||||||
|
|
||||||
parsed_response = json.loads(proxied_response.text)
|
parsed_response = json.loads(proxied_response.text)
|
||||||
|
|
||||||
if "refreshed_token_set" not in parsed_response:
|
if "refreshed_token_set" not in parsed_response:
|
||||||
|
@ -86,7 +83,7 @@ class ServiceTaskService:
|
||||||
parsed_response = json.loads(response.text)
|
parsed_response = json.loads(response.text)
|
||||||
return parsed_response
|
return parsed_response
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
current_app.logger.error(e)
|
||||||
return []
|
return []
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
const { port, hostname } = window.location;
|
const { port, hostname } = window.location;
|
||||||
console.log('START');
|
|
||||||
console.log('window.location', window.location);
|
|
||||||
let hostAndPort = `api.${hostname}`;
|
let hostAndPort = `api.${hostname}`;
|
||||||
let protocol = 'https';
|
let protocol = 'https';
|
||||||
|
|
||||||
|
@ -14,11 +12,9 @@ if (/^\d+\./.test(hostname) || hostname === 'localhost') {
|
||||||
}
|
}
|
||||||
|
|
||||||
let url = `${protocol}://${hostAndPort}/v1.0`;
|
let url = `${protocol}://${hostAndPort}/v1.0`;
|
||||||
console.log('OUR URL', url);
|
|
||||||
if (process.env.REACT_APP_BACKEND_BASE_URL) {
|
if (process.env.REACT_APP_BACKEND_BASE_URL) {
|
||||||
url = process.env.REACT_APP_BACKEND_BASE_URL;
|
url = process.env.REACT_APP_BACKEND_BASE_URL;
|
||||||
}
|
}
|
||||||
console.log('NO THIS ONE', url);
|
|
||||||
|
|
||||||
export const BACKEND_BASE_URL = url;
|
export const BACKEND_BASE_URL = url;
|
||||||
|
|
||||||
|
|
|
@ -73,11 +73,6 @@ export default function JsonSchemaFormBuilder() {
|
||||||
};
|
};
|
||||||
|
|
||||||
const onFormFieldTitleChange = (newFormFieldTitle: string) => {
|
const onFormFieldTitleChange = (newFormFieldTitle: string) => {
|
||||||
console.log('newFormFieldTitle', newFormFieldTitle);
|
|
||||||
console.log(
|
|
||||||
'setFormFieldIdHasBeenUpdatedByUser',
|
|
||||||
formFieldIdHasBeenUpdatedByUser
|
|
||||||
);
|
|
||||||
if (!formFieldIdHasBeenUpdatedByUser) {
|
if (!formFieldIdHasBeenUpdatedByUser) {
|
||||||
setFormFieldId(underscorizeString(newFormFieldTitle));
|
setFormFieldId(underscorizeString(newFormFieldTitle));
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,12 +42,6 @@ export default function ProcessGroupList() {
|
||||||
path: `/process-models?per_page=1000&recursive=true&include_parent_groups=true`,
|
path: `/process-models?per_page=1000&recursive=true&include_parent_groups=true`,
|
||||||
successCallback: processResultForProcessModels,
|
successCallback: processResultForProcessModels,
|
||||||
});
|
});
|
||||||
HttpService.makeCallToBackend({
|
|
||||||
path: `/status`,
|
|
||||||
successCallback: (result: any) => {
|
|
||||||
console.log(result);
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}, [searchParams]);
|
}, [searchParams]);
|
||||||
|
|
||||||
const processModelSearchArea = () => {
|
const processModelSearchArea = () => {
|
||||||
|
@ -69,7 +63,6 @@ export default function ProcessGroupList() {
|
||||||
};
|
};
|
||||||
|
|
||||||
if (processModelAvailableItems) {
|
if (processModelAvailableItems) {
|
||||||
console.log('document.cookie', document.cookie);
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<ProcessBreadcrumb hotCrumbs={[['Process Groups']]} />
|
<ProcessBreadcrumb hotCrumbs={[['Process Groups']]} />
|
||||||
|
|
|
@ -45,7 +45,6 @@ export default function BaseInputTemplate<
|
||||||
// Note: since React 15.2.0 we can't forward unknown element attributes, so we
|
// Note: since React 15.2.0 we can't forward unknown element attributes, so we
|
||||||
// exclude the "options" and "schema" ones here.
|
// exclude the "options" and "schema" ones here.
|
||||||
if (!id) {
|
if (!id) {
|
||||||
console.log('No id for', props);
|
|
||||||
throw new Error(`no id for props ${JSON.stringify(props)}`);
|
throw new Error(`no id for props ${JSON.stringify(props)}`);
|
||||||
}
|
}
|
||||||
const inputProps = {
|
const inputProps = {
|
||||||
|
|
Loading…
Reference in New Issue