vincbeck commented on code in PR #65685:
URL: https://github.com/apache/airflow/pull/65685#discussion_r3130919518


##########
airflow-core/src/airflow/api_fastapi/auth/managers/base_auth_manager.py:
##########
@@ -158,6 +158,18 @@ async def get_user_from_token(self, token: str) -> 
BaseUser:
             log.error("Couldn't deserialize user from token, JWT token is not 
valid: %s", e)
             raise InvalidTokenError(str(e))
 
+    def get_fastapi_middlewares(self) -> list[tuple[type, dict[str, Any]]]:
+        """
+        Return middlewares the auth manager wants registered on the main 
FastAPI app.
+
+        Each entry is a ``(middleware_class, kwargs)`` tuple and is registered 
via
+        ``app.add_middleware`` by the API server. Auth managers that need to 
intercept or
+        augment incoming requests (for example, the FAB auth manager attaching 
an
+        anonymous user to unauthenticated requests when ``[fab] 
auth_role_public`` is
+        configured) should override this method.

Review Comment:
   nit, I would avoid mentioning a specific provider auth manager in core 
airflow



-- 
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]

Reply via email to