stephen-bracken commented on code in PR #70707: URL: https://github.com/apache/airflow/pull/70707#discussion_r4644888266
########## providers/keycloak/src/airflow/providers/keycloak/auth_manager/middleware.py: ########## @@ -14,17 +14,18 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. - from __future__ import annotations +from abc import ABCMeta, abstractmethod from typing import TYPE_CHECKING, cast -from fastapi import HTTPException, status +from fastapi import HTTPException, Request, Response, status from fastapi.responses import JSONResponse from jwt import ExpiredSignatureError, InvalidTokenError -from starlette.middleware.base import BaseHTTPMiddleware +from starlette.concurrency import run_in_threadpool +from starlette.datastructures import MutableHeaders -from airflow.api_fastapi.app import get_auth_manager +from airflow.api_fastapi.app import get_auth_manager, get_cookie_path Review Comment: the `KeycloakJWTMiddleware` is only imported by `get_fastapi_middleware` (3.3.0) and `get_jwt_refresh_middleware` (unreleased / 3.4.1), so moving the imports to the tests will fix this. -- 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]
