pierrejeambrun commented on code in PR #70783:
URL: https://github.com/apache/airflow/pull/70783#discussion_r4338768368
##########
airflow-core/src/airflow/api_fastapi/auth/middlewares/refresh_token.py:
##########
@@ -157,7 +158,15 @@ def _build_cookie_headers(request: Request, new_token:
str) -> tuple[str, list[s
return token_cookie, cleanup_cookies
@staticmethod
- async def _refresh_user(current_token: str) -> tuple[BaseUser | None,
BaseUser | None]:
+ async def _refresh_user(request: Request) -> tuple[BaseUser | None,
BaseUser | None]:
Review Comment:
The signature change to `_refresh_user(request)` is there so subclasses can
read cookies from the request. With `get_jwt_refresh_middleware`, such a
subclass can now replace the default middleware, so this method becomes
something subclasses rely on. Since it's private, could we make "_refresh_user"
public? So we can extend it easily and we need to be carefull to backward comp
when updating it.
--
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]