You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "uranusjr (via GitHub)" <gi...@apache.org> on 2023/09/14 03:29:54 UTC
[GitHub] [airflow] uranusjr commented on a diff in pull request #34349: Let auth managers provide their own API endpoints
uranusjr commented on code in PR #34349:
URL: https://github.com/apache/airflow/pull/34349#discussion_r1325311952
##########
airflow/auth/managers/fab/fab_auth_manager.py:
##########
@@ -62,6 +70,24 @@ def get_cli_commands() -> list[CLICommand]:
SYNC_PERM_COMMAND, # not in a command group
]
+ def get_api_blueprint(self) -> None | Blueprint:
+ """Return a blueprint of the API endpoints proposed by this auth manager."""
+ folder = Path(__file__).parents[0].resolve() # this is airflow/auth/managers/fab/
+ with folder.joinpath("openapi", "v1.yaml").open() as f:
+ specification = safe_load(f)
+ api = FlaskApi(
+ specification=specification,
+ resolver=_LazyResolver(),
+ base_path="/security/v1",
Review Comment:
Why? The endpoints don’t seem to be fab-specific to me, no need to couple them to the name.
##########
airflow/auth/managers/fab/fab_auth_manager.py:
##########
@@ -62,6 +70,24 @@ def get_cli_commands() -> list[CLICommand]:
SYNC_PERM_COMMAND, # not in a command group
]
+ def get_api_blueprint(self) -> None | Blueprint:
+ """Return a blueprint of the API endpoints proposed by this auth manager."""
+ folder = Path(__file__).parents[0].resolve() # this is airflow/auth/managers/fab/
+ with folder.joinpath("openapi", "v1.yaml").open() as f:
+ specification = safe_load(f)
+ api = FlaskApi(
+ specification=specification,
+ resolver=_LazyResolver(),
+ base_path="/security/v1",
Review Comment:
Why? The endpoints don’t seem to be fab-specific to me, no need to couple them to the name.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org