Metadata-Version: 2.1
Name: fastapi-key-auth
Version: 0.4.1
Summary: API key validation Middleware
Home-page: https://github.com/iwpnd/fastapi-key-auth
License: MIT
Keywords: tile38,async,client
Author: Benjamin Ramser
Author-email: legionaerr@googlemail.com
Requires-Python: >=3.7,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Requires-Dist: starlette (==0.13.6)
Project-URL: Repository, https://github.com/iwpnd/fastapi-key-auth
Description-Content-Type: text/markdown

## FastAPI-Key-Auth

```python
from fastapi import FastAPI
from fastapi_key_auth import AuthorizerMiddleware

app = FastAPI()

app.add_middleware(AuthorizerMiddleware)
```

An api key in `headers['x-api-key']` is validated against all values in your apps environment variables starting
with `API_KEY_` before passing it on to your `app`.
If the api key is not present, ergo invalid, it will return a `401 Unauthorized`.

