mirror of
https://github.com/thiagoralves/OpenPLC_v3.git
synced 2025-12-09 04:10:31 +08:00
[RTOP-26] Installation of additional python libraries for RestAPI auth
This commit is contained in:
@@ -92,9 +92,9 @@ function install_py_deps {
|
||||
python3 -m venv "$VENV_DIR"
|
||||
"$VENV_DIR/bin/python3" -m pip install --upgrade pip
|
||||
if [ "$1" == "neuron" ]; then
|
||||
"$VENV_DIR/bin/python3" -m pip install flask==2.2.5 werkzeug==2.2.2 flask-login==0.6.2 pyserial pymodbus==2.5.3 cryptography
|
||||
"$VENV_DIR/bin/python3" -m pip install flask==2.2.5 werkzeug==2.2.2 flask-login==0.6.2 pyserial pymodbus==2.5.3 cryptography flask_jwt_extended flask_sqlalchemy
|
||||
else
|
||||
"$VENV_DIR/bin/python3" -m pip install flask==2.3.3 werkzeug==2.3.7 flask-login==0.6.2 pyserial pymodbus==2.5.3 cryptography
|
||||
"$VENV_DIR/bin/python3" -m pip install flask==2.3.3 werkzeug==2.3.7 flask-login==0.6.2 pyserial pymodbus==2.5.3 cryptography flask_jwt_extended flask_sqlalchemy
|
||||
fi
|
||||
python3 -m pip install pymodbus==2.5.3
|
||||
}
|
||||
@@ -278,7 +278,7 @@ if [ "$1" == "win" ]; then
|
||||
#Setting up venv
|
||||
python3 -m venv "$VENV_DIR"
|
||||
"$VENV_DIR/bin/python3" get-pip3.py
|
||||
"$VENV_DIR/bin/python3" -m pip install flask==2.3.3 werkzeug==2.3.7 flask-login==0.6.2 pyserial pymodbus==2.5.3 cryptography
|
||||
"$VENV_DIR/bin/python3" -m pip install flask==2.3.3 werkzeug==2.3.7 flask-login==0.6.2 pyserial pymodbus==2.5.3 cryptography flask_jwt_extended flask_sqlalchemy
|
||||
|
||||
echo ""
|
||||
echo "[MATIEC COMPILER]"
|
||||
|
||||
@@ -116,7 +116,6 @@ def login():
|
||||
if not user or not user.check_password(password):
|
||||
return jsonify("Wrong username or password"), 401
|
||||
|
||||
# Notice that we are passing in the actual sqlalchemy user object here
|
||||
access_token = create_access_token(identity=user)
|
||||
return jsonify(access_token=access_token)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user