baptistegh commented on code in PR #75913:
URL: https://github.com/apache/airflow/pull/75913#discussion_r4611227321
##########
providers/keycloak/src/airflow/providers/keycloak/auth_manager/routes/login.py:
##########
@@ -112,6 +117,42 @@ def login(request: Request) -> RedirectResponse:
return response
+@login_router.get(
+ "/login/cli",
+ responses=create_openapi_http_exception_doc([status.HTTP_400_BAD_REQUEST]),
+)
+def login_cli(
+ redirect_uri: str,
+ state: Annotated[str, Query(min_length=1, max_length=512)],
+ # An S256 challenge is 43 base64url characters. ``auth_url`` does not
encode its parameters,
+ # so nothing else may reach it.
+ code_challenge: Annotated[str, Query(pattern=r"^[A-Za-z0-9_-]{43}$")],
+ code_challenge_method: str,
Review Comment:
Done in `7dc63b4c5f`, and the manual check is gone. FastAPI now rejects any
other method with `422`, and the OpenAPI spec shows `const: S256`.
---
Drafted-by: Claude Code (Opus 5.5); reviewed by @baptistegh before posting
##########
providers/keycloak/src/airflow/providers/keycloak/auth_manager/routes/login.py:
##########
@@ -112,6 +117,42 @@ def login(request: Request) -> RedirectResponse:
return response
+@login_router.get(
+ "/login/cli",
+ responses=create_openapi_http_exception_doc([status.HTTP_400_BAD_REQUEST]),
+)
+def login_cli(
+ redirect_uri: str,
+ state: Annotated[str, Query(min_length=1, max_length=512)],
+ # An S256 challenge is 43 base64url characters. ``auth_url`` does not
encode its parameters,
+ # so nothing else may reach it.
+ code_challenge: Annotated[str, Query(pattern=r"^[A-Za-z0-9_-]{43}$")],
+ code_challenge_method: str,
Review Comment:
Done in `7dc63b4c5f`, and the manual check is gone. FastAPI now rejects any
other method with `422`, and the OpenAPI spec shows `const: S256`.
---
Drafted-by: Claude Code (Opus 5.5); reviewed by @baptistegh before posting
--
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]