API key validation Middleware
Project description
FastAPI-Key-Auth
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 it will return a 401 Unauthorized
.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
fastapi-key-auth-0.3.0.tar.gz
(2.3 kB
view hashes)
Built Distribution
Close
Hashes for fastapi_key_auth-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 942348c18919dd1f232e9d7cc65dfcaed94c0e8a45f0d5d6916eb58de41f4906 |
|
MD5 | 8c4106e4901c0c8dc1152bc567ef808f |
|
BLAKE2b-256 | 2211a99463e7d5cf9609f360fcb303053636af7e28632aca6ac6264622b61c01 |