diff --git a/bifrost/auth.py b/bifrost/auth.py index 29fff3b..9127747 100644 --- a/bifrost/auth.py +++ b/bifrost/auth.py @@ -2,7 +2,6 @@ import os from crypt import crypt from functools import lru_cache -import pkg_resources from fastapi import Depends, HTTPException, status from fastapi.security import HTTPBasic, HTTPBasicCredentials @@ -17,7 +16,8 @@ def get_settings(): def validate(username: str, password: str, settings: config.Settings): - file = pkg_resources.resource_filename("bifrost", "../" + settings.htpasswd) + here = os.path.abspath(os.path.dirname(__file__)) + file = os.path.join(here, '../', settings.htpasswd) if not os.path.isfile(file): return None users = {}