bugraoz93 commented on code in PR #51657:
URL: https://github.com/apache/airflow/pull/51657#discussion_r2228809271
##########
airflow-core/src/airflow/api_fastapi/core_api/routes/public/auth.py:
##########
@@ -55,3 +55,23 @@ def logout(request: Request, next: None | str = None) ->
RedirectResponse:
logout_url = request.app.state.auth_manager.get_url_login()
return RedirectResponse(logout_url)
+
+
+@auth_router.get(
+ "/refresh",
+
responses=create_openapi_http_exception_doc([status.HTTP_307_TEMPORARY_REDIRECT]),
+)
+def refresh(request: Request, next: None | str = None) -> RedirectResponse:
+ """Refresh the authentication token."""
+ refresh_url = request.app.state.auth_manager.get_url_refresh()
+
+ if not refresh_url:
+ return
RedirectResponse(request.app.state.auth_manager.get_url_logout())
Review Comment:
Sure, I got the base url and redirected directly to /auth/logout endpoint
and updated the tests accordingly in test_auth
--
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]