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.7.tar.gz (1.7 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.7-py3-none-any.whl (2.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fastapi_login_shield-0.1.7.tar.gz
  • Upload date:
  • Size: 1.7 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.7.tar.gz
Algorithm Hash digest
SHA256 59a6d10ff3a2bdfa98f02ee2e1c3006c8ebec502e48e5c500b63b50341514a63
MD5 53e031d6d42c306a05c9792a2962800b
BLAKE2b-256 c5505373742f688e7b16de98669e4cce522d9d62a538a1f4352a2ad1f8ca0d50

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastapi_login_shield-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 4207dc64c0a409ca7fcbcbd617617526cb967b706b5165ca8f58e41f8fb8f574
MD5 79693780fec535acf1f61188f28dfd51
BLAKE2b-256 7b59be2c8745a3e89baf1ea466569fcad8bdae02d1b7a7725394e22f697a270a

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