stephen-bracken commented on code in PR #70783:
URL: https://github.com/apache/airflow/pull/70783#discussion_r3767807172
##########
airflow-core/src/airflow/api_fastapi/auth/managers/base_auth_manager.py:
##########
@@ -180,7 +180,17 @@ def get_fastapi_middlewares(self) ->
list[tuple[_MiddlewareFactory[Any], dict[st
unauthenticated requests when public access is configured) should
override this
method.
"""
- return []
+ return [self._get_jwt_refresh_middleware()]
+
+ def _get_jwt_refresh_middleware(self) -> tuple[_MiddlewareFactory[Any],
dict[str, Any]]:
+ """
+ Return the JWTRefreshMiddleware to refresh the Airflow JWT token.
+
+ :important: The JWTRefreshMiddleware should be included in
get_fastapi_middlewares()
+ """
+ from airflow.api_fastapi.auth.middlewares.refresh_token import
JWTRefreshMiddleware
Review Comment:
This method is supposed to be overrideable in sub classes to swap out the
base behaviour `JWTRefreshMiddleware` for some other middleware, see
https://github.com/apache/airflow/blob/90c0c8cf2e4b0e1f905b9425154fbde53e89286f/providers/keycloak/src/airflow/providers/keycloak/auth_manager/middleware.py#L62
--
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]