diff --git a/spiffworkflow-backend/bin/login_with_users b/spiffworkflow-backend/bin/login_with_users index 167c57f9..3883f046 100755 --- a/spiffworkflow-backend/bin/login_with_users +++ b/spiffworkflow-backend/bin/login_with_users @@ -28,7 +28,11 @@ REALM_NAME=${2-spiffworkflow} while read -r input_line; do if ! grep -qE '(^#|email)' <<<"$input_line" ; then username=$(awk -F '@' '{print $1}' <<<"$input_line") - access_token=$("${script_dir}/get_token" "$username" "$username" "$REALM_NAME" || echo '') + password=$(awk -F ',' '{print $2}' <<<"$input_line") + if [[ -z "$password" ]]; then + password="$username" + fi + access_token=$("${script_dir}/get_token" "$username" "$password" "$REALM_NAME" || echo '') if [[ -z "$access_token" || "$access_token" == "null" ]]; then >&2 echo "ERROR: failed to get access token for '$username'" else diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/exceptions/api_error.py b/spiffworkflow-backend/src/spiffworkflow_backend/exceptions/api_error.py index f6b2d391..25ce5ee6 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/exceptions/api_error.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/exceptions/api_error.py @@ -128,7 +128,7 @@ class ApiError(Exception): instance = cls(code, message, status_code=status_code) instance.task_id = task_spec.name or "" instance.task_name = task_spec.description or "" - if task_spec._wf_spec: + if hasattr(task_spec, '_wf_spec') and task_spec._wf_spec: instance.file_name = task_spec._wf_spec.file return instance