Commit Graph

3 Commits

Author SHA1 Message Date
Robbe Sneyders
84e33e5897 Add routing middleware (#1497)
* Add routing middleware

Factor out starlette BaseHTTPMiddleware

Fix exceptions for starlette < 0.19

Fix docstring formatting

Rename middleware/base.py to abstract.py

Rework routing middleware

* Clean up abstract API docstrings

* Move connexion context into extensions

* Allow empty middleware list
2022-04-19 22:55:20 +02:00
Jyhess
8830d56841 Async security check (#869)
Co-authored-by: Jacob Floyd <cognifloyd@gmail.com>

Fixes #868

Allow to use coroutines with Aiohttp in security handlers.

- Move all function from connexion.operations.security to a class in connexion.security.SecurityHandlerFactory
- Specialize this class for AioHttp and Flask, and instantiate them in dedicated APIs
- AioHttp specialization now support coroutines
- pass_context_arg_name option is supported for security handlers
2020-07-22 06:52:16 +00:00
lynxknight
fda2b18b38 AioHttpApi oauth middleware should catch all OAuth problems (#830)
Fixes #829

* aiohttp openapi basic auth testing

* let oauth_problem_middleware recognize all OAuth exceptions

* scope problem should return 403

* excepting two classes makes more sense than subclassing hacks
2019-01-14 08:44:54 +01:00