diff --git a/bento_reference_service/authz.py b/bento_reference_service/authz.py index 2caf6dd..90c2e63 100644 --- a/bento_reference_service/authz.py +++ b/bento_reference_service/authz.py @@ -1,4 +1,3 @@ -import re from bento_lib.auth.middleware.fastapi import FastApiAuthMiddleware from .config import get_config from .logger import get_logger @@ -9,11 +8,4 @@ # Non-standard middleware setup so that we can import the instance and use it for dependencies too config = get_config() # TODO: Find a way to DI this -authz_middleware = FastApiAuthMiddleware.build_from_pydantic_config( - config, - get_logger(config), - exempt_request_patterns=( - (r"GET", re.escape(config.service_docs_path)), - (r"GET", re.escape(config.service_openapi_path)), - ), -) +authz_middleware = FastApiAuthMiddleware.build_from_fastapi_pydantic_config(config, get_logger(config))