Merge pull request #1 from mxmehl/fix-http-auth-module
Fix error due to httpauth module
This commit is contained in:
@@ -17,7 +17,6 @@ from flask import (
|
||||
session,
|
||||
url_for,
|
||||
)
|
||||
from flask_httpauth import HTTPBasicAuth
|
||||
|
||||
from home_stream.helpers import (
|
||||
file_type,
|
||||
@@ -26,11 +25,8 @@ from home_stream.helpers import (
|
||||
secure_path,
|
||||
serve_via_gunicorn,
|
||||
validate_user,
|
||||
verify_password,
|
||||
)
|
||||
|
||||
auth = HTTPBasicAuth()
|
||||
|
||||
|
||||
def create_app(config_path: str) -> Flask:
|
||||
"""Create a Flask application instance."""
|
||||
@@ -42,7 +38,6 @@ def create_app(config_path: str) -> Flask:
|
||||
|
||||
def init_routes(app: Flask):
|
||||
"""Initialize routes for the Flask application."""
|
||||
auth.verify_password(verify_password)
|
||||
|
||||
@app.context_processor
|
||||
def inject_auth():
|
||||
@@ -152,7 +147,7 @@ def main():
|
||||
"-c", "--config-file", required=True, help="Path to the app's config file (YAML format)"
|
||||
)
|
||||
parser.add_argument("--host", default="localhost", help="Hostname of the server")
|
||||
parser.add_argument("-p", "--port", type=int, default=5000, help="Port of the server")
|
||||
parser.add_argument("-p", "--port", type=int, default=8000, help="Port of the server")
|
||||
parser.add_argument(
|
||||
"-vv",
|
||||
"--debug",
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
"""WSGI entry point for the Home Stream application."""
|
||||
|
||||
from home_stream.app import create_app as build_app
|
||||
from .app import create_app as build_app
|
||||
|
||||
|
||||
def create_app(config_path):
|
||||
|
||||
16
poetry.lock
generated
16
poetry.lock
generated
@@ -197,20 +197,6 @@ Werkzeug = ">=3.1"
|
||||
async = ["asgiref (>=3.2)"]
|
||||
dotenv = ["python-dotenv"]
|
||||
|
||||
[[package]]
|
||||
name = "flask-httpauth"
|
||||
version = "4.8.0"
|
||||
description = "HTTP authentication for Flask routes"
|
||||
optional = false
|
||||
python-versions = "*"
|
||||
files = [
|
||||
{file = "Flask-HTTPAuth-4.8.0.tar.gz", hash = "sha256:66568a05bc73942c65f1e2201ae746295816dc009edd84b482c44c758d75097a"},
|
||||
{file = "Flask_HTTPAuth-4.8.0-py3-none-any.whl", hash = "sha256:a58fedd09989b9975448eef04806b096a3964a7feeebc0a78831ff55685b62b0"},
|
||||
]
|
||||
|
||||
[package.dependencies]
|
||||
flask = "*"
|
||||
|
||||
[[package]]
|
||||
name = "gunicorn"
|
||||
version = "23.0.0"
|
||||
@@ -632,4 +618,4 @@ watchdog = ["watchdog (>=2.3)"]
|
||||
[metadata]
|
||||
lock-version = "2.0"
|
||||
python-versions = "^3.10"
|
||||
content-hash = "5e3f5deb2c1bb09838c7cfae292f6b2a17e583f60e557aaced5fea2f54e1c646"
|
||||
content-hash = "f4e07fa07b3737c1a26eb68260933441340f75630058faa47d15bc69a6cc8231"
|
||||
|
||||
@@ -19,7 +19,6 @@ home-stream = "home_stream.app:main"
|
||||
[tool.poetry.dependencies]
|
||||
python = "^3.10"
|
||||
flask = "^3.1.0"
|
||||
flask-httpauth = "^4.8.0"
|
||||
bcrypt = "^4.3.0"
|
||||
gunicorn = "^23.0.0"
|
||||
pyyaml = "^6.0.2"
|
||||
|
||||
Reference in New Issue
Block a user