mik-laj edited a comment on issue #8111:
URL: https://github.com/apache/airflow/issues/8111#issuecomment-660817828
@jhtimmins Hi. I started cleaning up the authentication code for the
experimental API and I like the concept that is implemented there. Auth backend
selection is done with option`auth_backend` in `api` section.
Each backend must have 2 defined methods:
- `init_app(app: Flask)` - function invoked when creating a flash
application, which allows you to add a new view.
- `requires_authentication(fn: Callable)` - a decorator that allows
arbitrary code execution before and after or instead of a view function.
and can define one attribute:
- `CLIENT_AUTH: : Optional[Union[Tuple[str, str], AuthBase]]` - attribute
used by CLI in remote mode. Irrelevant in our case.
We currently have several backends implemented:
https://github.com/apache/airflow/tree/master/airflow/api/auth/backend
I am also working on one
https://github.com/apache/airflow/pull/9848/files
What do you think to use this code in the new API as well?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]