fastapi-key-auth

FastAPI API key authorizer

MIT License

Downloads
2.4K
Stars
37
Committers
6

Bot releases are hidden (Show)

fastapi-key-auth - v0.14.0

Published by iwpnd 10 months ago

v0.14.0 (2023-06-13)

Feat

  • feat: drop 3.8 support
fastapi-key-auth - [0.12.0]

Published by iwpnd over 1 year ago

v0.12.0 (2023-06-13)

❗ Please update this library ASAP

Fix

  • Empty api_key passing authentication (c30376e)
fastapi-key-auth - [0.11.0]

Published by iwpnd over 1 year ago

drop python 3.7 support

fastapi-key-auth - [0.10.2]

Published by iwpnd over 1 year ago

update dependencies

fastapi-key-auth - [0.10.1]

Published by iwpnd over 1 year ago

fix: fastapi dependency

fastapi-key-auth - [0.10.0]

Published by iwpnd over 1 year ago

bump dependencies

fastapi-key-auth - [0.9.0]

Published by iwpnd over 1 year ago

bump dependencies

thanks @francbartoli

fastapi-key-auth - [0.8.0]

Published by iwpnd almost 2 years ago

v0.8.0 (2022-10-31)

Feature

Refactor

  • check key_pattern once d9877c by @MendyLanda
fastapi-key-auth - [0.7.5]

Published by iwpnd over 2 years ago

chore

bump FastAPI dependency range to >=0.70.0,<0.85.0

fastapi-key-auth - [0.7.4]

Published by iwpnd over 2 years ago

chore

bump FastAPI dependency range to >=0.70.0,<0.78.0
bump starlette dependency to ^0.19.0

fastapi-key-auth - [0.7.3]

Published by iwpnd over 2 years ago

Fix FastAPI dependency range to >=0.70.0,<0.76.0

fastapi-key-auth - [0.7.2]

Published by iwpnd over 2 years ago

bump fastapi dependency

fastapi-key-auth - [0.7.1]

Published by iwpnd almost 3 years ago

Updating core dependencies

fastapi ^0.71.0
starlette ^0.17.1

fastapi-key-auth - [0.7.0]

Published by iwpnd about 3 years ago

v0.7.0 (2021-10-08)

Feature

  • Remove version constrains on starlette and fastapi (28a4f29)
fastapi-key-auth - [v0.6.0]: Add dependency authorizer

Published by iwpnd over 3 years ago

As Dependency

from fastapi import FastAPI, Depends
from fastapi_key_auth import AuthorizerDependency

authorizer = AuthorizerDependency(key_pattern="API_KEY_")

# either globally or in a router
app = FastAPI(dependencies=[Depends(authorizer)])
fastapi-key-auth - [0.5.0]: allow regex in public_path

Published by iwpnd over 3 years ago

  • allow regex match for public_path
from fastapi Import FastAPI
from fastapi_key_path import AuthorizerMiddleware

app = FastAPI()
app.add_middleware(AuthorizerMiddleware, public_paths=["/ping", "^/public"])
fastapi-key-auth - [v0.4.1]: fix public_path validation

Published by iwpnd over 3 years ago

  • fix an error in public_paths validation
fastapi-key-auth - [v0.4.0]: add option to add public routes

Published by iwpnd over 3 years ago

exclude path from x-api-key requirement.

from fastapi import FastAPI
from fastap_key_auth import AuthorizerMiddleware

app = FastAPI()

app.add_middleware(AuthorizerMiddleware, public_paths=["/health"])
fastapi-key-auth - Initial release :tada:

Published by iwpnd over 3 years ago

Secure your FastAPI with a middleware validating x-api-key in the header of incoming requests. Is the x-api-key present in your applications environment they will be authorized, else not. 🤩

Example:

from fastapi import FastAPI
from fastapi_key_auth import AuthorizerMiddleware

app = FastAPI()
app.add_middleware(AuthorizerMiddleware)
Package Rankings
Top 10.44% on Pypi.org
Related Projects