Skip to main content

Protect FastAPI login endpoints from brute-force attacks

Project description

fastapi-login-shield

A simple FastAPI middleware to protect login endpoints from brute-force attacks.

Features

  • Exponential backoff delay on failed login attempts
  • Ignores the first 3 failed attempts (no delay)
  • Monitors only the specified login path
  • No external dependencies or complex setup required

Usage

from fastapi import FastAPI
from your_module import LoginShieldMiddleware

app = FastAPI()
app.add_middleware(LoginShieldMiddleware, login_path="/login")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fastapi_login_shield-0.1.6.tar.gz (1.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fastapi_login_shield-0.1.6-py3-none-any.whl (2.4 kB view details)

Uploaded Python 3

File details

Details for the file fastapi_login_shield-0.1.6.tar.gz.

File metadata

  • Download URL: fastapi_login_shield-0.1.6.tar.gz
  • Upload date:
  • Size: 1.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for fastapi_login_shield-0.1.6.tar.gz
Algorithm Hash digest
SHA256 5e683424b491764af90338e59b116e0f91d52b58e1a9d9d9b55585f7cb08fb62
MD5 55e1dc79fd98382ee9075b6a961a786c
BLAKE2b-256 aebbcac92919944ca5409b7e82759fd8dbb2d6345537458e88f2b9ebe75ad3d4

See more details on using hashes here.

File details

Details for the file fastapi_login_shield-0.1.6-py3-none-any.whl.

File metadata

File hashes

Hashes for fastapi_login_shield-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 66b20d2b1ddc8a4a22826a498ad4d997a68f792a1333121238539242f2db2f41
MD5 81e856ba4eb0172e94432da25857115f
BLAKE2b-256 a253194747c1fbef29de8b5a1aa6b921e776437b640d4b1e5189c126be8fba48

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page