pierrejeambrun commented on code in PR #70783:
URL: https://github.com/apache/airflow/pull/70783#discussion_r4338603860
##########
airflow-core/src/airflow/api_fastapi/core_api/app.py:
##########
@@ -304,11 +302,10 @@ def init_config(app: FastAPI) -> None:
def init_middlewares(app: FastAPI) -> None:
from airflow.api_fastapi.app import get_auth_manager
- from airflow.api_fastapi.auth.middlewares.refresh_token import
JWTRefreshMiddleware
- app.add_middleware(JWTRefreshMiddleware,
skip_path_prefixes=(f"{_STATIC_URL_PATH}/",))
+ auth_manager = get_auth_manager()
- for middleware_cls, middleware_kwargs in
get_auth_manager().get_fastapi_middlewares():
+ for middleware_cls, middleware_kwargs in
(*auth_manager.get_jwt_refresh_middleware(),
*auth_manager.get_fastapi_middlewares()):
Review Comment:
nit: `ruff format` reformats this line and the extra blank line added in
`base_auth_manager.py`. Could you also merge the two `if TYPE_CHECKING:` blocks
in `refresh_token.py`? Running `prek run --from-ref main` should catch these.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]