You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The customizer allows for web-framework specific customiztion.
For example, it can be used to add authentication to pyctuator running with FastAPI.
See #67
Copy file name to clipboardExpand all lines: README.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -331,6 +331,10 @@ Pyctuator(
331
331
)
332
332
```
333
333
334
+
### Protecting Pyctuator with authentication
335
+
Since there are numerous standard approaches to protect an API, Pyctuator doesn't explicitly support any of them. Instead, Pyctuator allows to customize its integration with the web-framework.
336
+
See the example in [fastapi_with_authentication_example_app.py](examples/FastAPI/fastapi_with_authentication_example_app.py).
337
+
334
338
## Full blown examples
335
339
The `examples` folder contains full blown Python projects that are built using [Poetry](https://python-poetry.org/).
Copy file name to clipboardExpand all lines: examples/FastAPI/README.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,4 +13,8 @@ This example demonstrates the integration with the [FastAPI](https://fastapi.tia
13
13
poetry run python -m fastapi_example_app
14
14
```
15
15
16
-

16
+

17
+
18
+
## Running an example where pyctuator requires authentication
19
+
In order to protect the Pyctuator endpoint, a customizer is used to make the required configuration changes to the API router.
20
+
In addition, the credentials need to be included in the registration request sent to SBA in order for it it could authenticate when querying the pyctuator API.
0 commit comments